| Index: lib/content/elemHideEmulation.js |
| =================================================================== |
| --- a/lib/content/elemHideEmulation.js |
| +++ b/lib/content/elemHideEmulation.js |
| @@ -411,16 +411,17 @@ |
| } |
| function ElemHideEmulation(addSelectorsFunc, hideElemsFunc) |
| { |
| this.document = document; |
| this.addSelectorsFunc = addSelectorsFunc; |
| this.hideElemsFunc = hideElemsFunc; |
| this.observer = new MutationObserver(this.observe.bind(this)); |
| + this.useInlineStyles = true; |
|
kzar
2018/03/19 21:18:54
This doesn't match `alwaysHideWithSelector` in the
Manish Jethani
2018/03/20 11:20:23
Done.
|
| } |
| ElemHideEmulation.prototype = { |
| isSameOrigin(stylesheet) |
| { |
| try |
| { |
| return new URL(stylesheet.href).origin == this.document.location.origin; |
| @@ -568,17 +569,18 @@ |
| } |
| generator = evaluate(pattern.selectors, 0, "", |
| this.document, cssStyles); |
| } |
| for (let selector of generator) |
| { |
| if (selector != null) |
| { |
| - if (isSelectorHidingOnlyPattern(pattern)) |
| + if (!this.useInlineStyles || |
| + isSelectorHidingOnlyPattern(pattern)) |
| { |
| selectors.push(selector); |
| selectorFilters.push(pattern.text); |
| } |
| else |
| { |
| for (let element of this.document.querySelectorAll(selector)) |
| { |