From 4570cd19ad1e499fe95f3d9c6832dd2c7e997587 Mon Sep 17 00:00:00 2001 From: GrzegorzZajac000 Date: Sat, 2 Mar 2024 15:11:37 +0100 Subject: [PATCH] #1513 Mutation observer FIX - typo FIX + ByBit --- src/content/observer/createObserver.js | 2 +- src/content/observer/observerFunctions/addedNodes.js | 2 +- src/content/observer/observerFunctions/hiddenNodes.js | 2 +- src/content/observer/observerFunctions/removedNodes.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/observer/createObserver.js b/src/content/observer/createObserver.js index ea563e3..25bb907 100644 --- a/src/content/observer/createObserver.js +++ b/src/content/observer/createObserver.js @@ -46,7 +46,7 @@ const createObserver = tabData => { if ( (mutation?.addedNodes && Array.from(mutation?.addedNodes).length > 0) || (mutation?.attributeName === 'disabled' && !mutation?.target?.disabled) || - (mutation?.attirbuteName === 'style' && mutation?.target) + (mutation?.attributeName === 'style' && mutation?.target) ) { addedNodes(mutation, tabData); } diff --git a/src/content/observer/observerFunctions/addedNodes.js b/src/content/observer/observerFunctions/addedNodes.js index aedd69f..b216b9e 100644 --- a/src/content/observer/observerFunctions/addedNodes.js +++ b/src/content/observer/observerFunctions/addedNodes.js @@ -84,7 +84,7 @@ const addedNodes = (mutation, tabInfo) => { return false; } - queue.push(...Array.from(mutation.target)); + queue.push(mutation.target); queue.push(...Array.from(mutation.addedNodes)); if (!tabData) { diff --git a/src/content/observer/observerFunctions/hiddenNodes.js b/src/content/observer/observerFunctions/hiddenNodes.js index af63d6a..cc740c1 100644 --- a/src/content/observer/observerFunctions/hiddenNodes.js +++ b/src/content/observer/observerFunctions/hiddenNodes.js @@ -85,7 +85,7 @@ const hiddenNodes = (mutation, tabInfo) => { return false; } - queue.push(...Array.from(mutation.target)); + queue.push(mutation.target); if (!tabData) { tabData = tabInfo; diff --git a/src/content/observer/observerFunctions/removedNodes.js b/src/content/observer/observerFunctions/removedNodes.js index a1e1a7e..b7fe2f7 100644 --- a/src/content/observer/observerFunctions/removedNodes.js +++ b/src/content/observer/observerFunctions/removedNodes.js @@ -96,7 +96,7 @@ const removedNodes = (mutation, tabInfo) => { return false; } - queue.push(...Array.from(mutation.target)); + queue.push(mutation.target); queue.push(...Array.from(mutation.removedNodes)); if (!tabData) {