Index: lib/filterListener.js |
=================================================================== |
--- a/lib/filterListener.js |
+++ b/lib/filterListener.js |
@@ -25,8 +25,10 @@ |
let {FilterStorage} = require("filterStorage"); |
let {FilterNotifier} = require("filterNotifier"); |
let {ElemHide} = require("elemHide"); |
+let {CSSRules} = require("cssRules"); |
let {defaultMatcher} = require("matcher"); |
-let {ActiveFilter, RegExpFilter, ElemHideBase} = require("filterClasses"); |
+let {ActiveFilter, RegExpFilter, ElemHideBase, CSSPropertyFilter} = |
+ require("filterClasses"); |
Wladimir Palant
2015/11/05 12:46:19
Nit: While I couldn't find anything in our style g
Thomas Greiner
2015/11/25 11:20:00
Done. I looked through our code and unfortunately,
|
let {Prefs} = require("prefs"); |
/** |
@@ -156,7 +158,12 @@ |
if (filter instanceof RegExpFilter) |
defaultMatcher.add(filter); |
else if (filter instanceof ElemHideBase) |
- ElemHide.add(filter); |
+ { |
+ if (filter instanceof CSSPropertyFilter) |
+ CSSRules.add(filter); |
+ else |
+ ElemHide.add(filter); |
+ } |
} |
/** |
@@ -182,7 +189,12 @@ |
if (filter instanceof RegExpFilter) |
defaultMatcher.remove(filter); |
else if (filter instanceof ElemHideBase) |
- ElemHide.remove(filter); |
+ { |
+ if (filter instanceof CSSPropertyFilter) |
+ CSSRules.remove(filter); |
+ else |
+ ElemHide.remove(filter); |
+ } |
} |
/** |
@@ -264,6 +276,7 @@ |
defaultMatcher.clear(); |
ElemHide.clear(); |
+ CSSRules.clear(); |
for (let subscription of FilterStorage.subscriptions) |
if (!subscription.disabled) |
subscription.filters.forEach(addFilter); |