Index: lib/content/elemHideEmulation.js |
=================================================================== |
--- a/lib/content/elemHideEmulation.js |
+++ b/lib/content/elemHideEmulation.js |
@@ -599,17 +599,16 @@ |
} |
function ElemHideEmulation(addSelectorsFunc, hideElemsFunc) |
{ |
this.document = document; |
this.addSelectorsFunc = addSelectorsFunc; |
this.hideElemsFunc = hideElemsFunc; |
this.observer = new MutationObserver(this.observe.bind(this)); |
- this.useInlineStyles = true; |
} |
ElemHideEmulation.prototype = { |
isSameOrigin(stylesheet) |
{ |
try |
{ |
return new URL(stylesheet.href).origin == this.document.location.origin; |
@@ -801,28 +800,20 @@ |
generator = evaluate(pattern.selectors, 0, "", |
this.document, cssStyles, evaluationTargets); |
} |
for (let selector of generator) |
{ |
if (selector != null) |
{ |
- if (!this.useInlineStyles) |
+ for (let element of this.document.querySelectorAll(selector)) |
{ |
- selectors.push(selector); |
- selectorFilters.push(pattern.text); |
- } |
- else |
- { |
- for (let element of this.document.querySelectorAll(selector)) |
- { |
- elements.push(element); |
- elementFilters.push(pattern.text); |
- } |
+ elements.push(element); |
+ elementFilters.push(pattern.text); |
} |
} |
if (performance.now() - cycleStart > MAX_SYNCHRONOUS_PROCESSING_TIME) |
{ |
setTimeout(processPatterns, 0); |
return; |
} |
} |