Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/elemHide.js

Issue 29853558: Noissue - Delete element hiding domain entry once all filters removed (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Aug. 11, 2018, 1:04 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/elemHide.js
===================================================================
--- a/lib/elemHide.js
+++ b/lib/elemHide.js
@@ -190,17 +190,22 @@
// Conditionally applied element hiding filters
else
{
let domains = filter.domains || defaultDomains;
for (let domain of domains.keys())
{
let filters = filtersByDomain.get(domain);
if (filters)
+ {
filters.delete(filter);
+
+ if (filters.size == 0)
+ filtersByDomain.delete(domain);
+ }
}
}
knownFilters.delete(filter);
FilterNotifier.emit("elemhideupdate");
},
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld