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

Delta Between Two Patch Sets: lib/elemHide.js

Issue 29778572: Noissue - Make private functions inaccessible via ElemHide object (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Add JSDoc comment Created May 11, 2018, 12:19 p.m.
Right Patch Set: Fix JSDoc comment error Created May 11, 2018, 12:25 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 let knownFilters = new Set(); 60 let knownFilters = new Set();
61 61
62 /** 62 /**
63 * Lookup table, lists of element hiding exceptions by selector 63 * Lookup table, lists of element hiding exceptions by selector
64 * @type {Map.<string,Filter>} 64 * @type {Map.<string,Filter>}
65 */ 65 */
66 let exceptions = new Map(); 66 let exceptions = new Map();
67 67
68 /** 68 /**
69 * Adds a filter to the lookup table of filters by domain. 69 * Adds a filter to the lookup table of filters by domain.
70 * @param {Filter} 70 * @param {Filter} filter
71 */ 71 */
72 function addToFiltersByDomain(filter) 72 function addToFiltersByDomain(filter)
73 { 73 {
74 let domains = filter.domains || defaultDomains; 74 let domains = filter.domains || defaultDomains;
75 for (let [domain, isIncluded] of domains) 75 for (let [domain, isIncluded] of domains)
76 { 76 {
77 // There's no need to note that a filter is generically disabled. 77 // There's no need to note that a filter is generically disabled.
78 if (!isIncluded && domain == "") 78 if (!isIncluded && domain == "")
79 continue; 79 continue;
80 80
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 if (currentDomain == "") 294 if (currentDomain == "")
295 break; 295 break;
296 296
297 let nextDot = currentDomain.indexOf("."); 297 let nextDot = currentDomain.indexOf(".");
298 currentDomain = nextDot == -1 ? "" : currentDomain.substr(nextDot + 1); 298 currentDomain = nextDot == -1 ? "" : currentDomain.substr(nextDot + 1);
299 } 299 }
300 300
301 return selectors; 301 return selectors;
302 } 302 }
303 }; 303 };
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld