Index: chrome/content/elemHideEmulation.js |
=================================================================== |
--- a/chrome/content/elemHideEmulation.js |
+++ b/chrome/content/elemHideEmulation.js |
@@ -241,16 +241,18 @@ |
} |
else |
regexpString = filterToRegExp(propertyExpression); |
this._regexp = new RegExp(regexpString, "i"); |
} |
PropsSelector.prototype = { |
+ preferHideWithSelector: true, |
+ |
*findPropsSelectors(styles, prefix, regexp) |
{ |
for (let style of styles) |
if (regexp.test(style.style)) |
for (let subSelector of style.subSelectors) |
yield prefix + subSelector; |
}, |
@@ -371,17 +373,18 @@ |
} |
let {document} = this.window; |
for (let pattern of this.patterns) |
{ |
for (let selector of evaluate(pattern.selectors, |
0, "", document, cssStyles)) |
{ |
- if (!pattern.selectors.some(s => s.requiresHiding)) |
+ if (pattern.selectors.some(s => s.preferHideWithSelector) && |
+ !pattern.selectors.some(s => s.requiresHiding)) |
{ |
selectors.push(selector); |
selectorFilters.push(pattern.text); |
} |
else |
{ |
for (let element of document.querySelectorAll(selector)) |
{ |