Index: lib/elemHide.js |
diff --git a/lib/elemHide.js b/lib/elemHide.js |
index 6e2f1b56acbb6e67e79f779503b469f9d8829903..700db132d52c5ee81e90e3f122f6ac701a1d074c 100644 |
--- a/lib/elemHide.js |
+++ b/lib/elemHide.js |
@@ -157,14 +157,14 @@ var ElemHide = exports.ElemHide = |
if (usingFiltersByDomain) |
{ |
- let domainMatches = filter.domains || defaultDomains; |
- for (let domain in domainMatches) |
+ let domains = filter.domains || defaultDomains; |
+ for (let domain in domains) |
{ |
let filters = filtersByDomain[domain]; |
if (!filters) |
filters = filtersByDomain[domain] = Object.create(null); |
- if (domainMatches[domain]) |
+ if (domains[domain]) |
filters[filter.text] = filter; |
else |
filters[filter.text] = false; |
@@ -201,6 +201,17 @@ var ElemHide = exports.ElemHide = |
delete filterByKey[key]; |
delete keyByFilter[filter.text]; |
ElemHide.isDirty = true; |
+ |
+ if (usingFiltersByDomain) |
+ { |
+ let domains = filter.domains || defaultDomains; |
+ for (let domain in domains) |
+ { |
+ let filters = filtersByDomain[domain]; |
+ if (filters) |
+ delete filters[filter.text]; |
+ } |
+ } |
} |
}, |