LEFT | RIGHT |
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 Loading... |
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 Loading... |
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 }; |
LEFT | RIGHT |