Index: include.preload.js |
=================================================================== |
--- a/include.preload.js |
+++ b/include.preload.js |
@@ -394,20 +394,19 @@ |
} |
}; |
function ContentFiltering() |
{ |
this.styles = new Map(); |
this.tracer = null; |
this.inline = true; |
- this.inlineEmulated = true; |
this.elemHideEmulation = new ElemHideEmulation( |
- this.addSelectors.bind(this), |
+ () => {}, |
this.hideElements.bind(this) |
); |
} |
ContentFiltering.prototype = { |
selectorGroupSize: 1024, |
addSelectorsInline(selectors, groupName, appendOnly = false) |
{ |
@@ -457,17 +456,17 @@ |
let selector = selectors.slice(i, i + this.selectorGroupSize).join(", "); |
style.sheet.insertRule(selector + "{display: none !important;}", |
style.sheet.cssRules.length); |
} |
}, |
addSelectors(selectors, filters, groupName = "emulated", appendOnly = false) |
{ |
- if (this.inline || this.inlineEmulated) |
+ if (this.inline) |
{ |
// Insert the style rules inline if we have been instructed by the |
// background page to do so. This is usually the case, except on platforms |
// that do support user stylesheets via the browser.tabs.insertCSS API |
// (Firefox 53 onwards for now and possibly Chrome in the near future). |
// Once all supported platforms have implemented this API, we can remove |
// the code below. See issue #5090. |
// Related Chrome and Firefox issues: |
@@ -517,29 +516,23 @@ |
if (this.tracer) |
this.tracer.disconnect(); |
this.tracer = null; |
if (response.trace) |
this.tracer = new ElementHidingTracer(); |
this.inline = response.inline; |
- this.inlineEmulated = !!response.inlineEmulated; |
if (this.inline) |
this.addSelectorsInline(response.selectors, "standard"); |
if (this.tracer) |
this.tracer.addSelectors(response.selectors); |
- // Prefer CSS selectors for -abp-has and -abp-contains unless the |
- // background page has asked us to use inline styles. |
- this.elemHideEmulation.useInlineStyles = this.inline || |
- this.inlineEmulated; |
- |
this.elemHideEmulation.apply(response.emulatedPatterns); |
}); |
} |
}; |
if (document instanceof HTMLDocument) |
{ |
checkSitekey(); |