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

Unified Diff: lib/elemHide.js

Issue 29757595: Noissue - Use plural for element hiding domains (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created April 20, 2018, 8:22 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 | lib/filterClasses.js » ('j') | 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
@@ -245,38 +245,38 @@
*/
getFilterByKey(key)
{
return (key in filterByKey ? filterByKey[key] : null);
},
/**
* Returns a list of all selectors as a nested map. On first level, the keys
- * are all values of `ElemHideBase.selectorDomain` (domains on which these
+ * are all values of `ElemHideBase.selectorDomains` (domains on which these
* selectors should apply, ignoring exceptions). The values are maps again,
* with the keys being selectors and values the corresponding filter keys.
* @returns {Map.<String,Map<String,String>>}
*/
getSelectors()
{
- let domains = new Map();
+ let map = new Map();
for (let key in filterByKey)
{
let filter = filterByKey[key];
if (!filter.selector)
continue;
- let domain = filter.selectorDomain || "";
+ let domains = filter.selectorDomains || "";
- if (!domains.has(domain))
- domains.set(domain, new Map());
- domains.get(domain).set(filter.selector, key);
+ if (!map.has(domains))
+ map.set(domains, new Map());
+ map.get(domains).set(filter.selector, key);
}
- return domains;
+ return map;
},
/**
* Returns a list of selectors that apply on each website unconditionally.
* @returns {string[]}
*/
getUnconditionalSelectors()
{
« no previous file with comments | « no previous file | lib/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld