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"); |
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); |