fix: wrong performance

This commit is contained in:
wanhose 2021-11-03 16:12:29 +01:00
parent 9c5d8f60a7
commit 0b2e5e5cef
3 changed files with 8 additions and 3 deletions

View File

@ -55,8 +55,12 @@ const observer = new MutationObserver((mutations, instance) => {
for (let j = mutation.addedNodes.length; j--; ) {
const node = mutation.addedNodes[j];
const valid =
node instanceof HTMLElement &&
node.parentElement &&
!["BODY", "HTML"].includes(node.tagName);
if (!(node instanceof HTMLElement)) continue;
if (!valid) continue;
if (node.matches(selectors)) node.outerHTML = "";
}

3
styles/fixes.css Normal file
View File

@ -0,0 +1,3 @@
body > * {
filter: initial !important;
}

View File

@ -1,5 +1,3 @@
/* Globals */
:root {
--color-chocolate: #47321e;
--color-cookie: #f2e9df;