Left: | ||
Right: |
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
153 | 153 |
154 // Whitelisting filters | 154 // Whitelisting filters |
155 if (filter instanceof ElemHideException) | 155 if (filter instanceof ElemHideException) |
156 { | 156 { |
157 let list = exceptions.get(filter.selector); | 157 let list = exceptions.get(filter.selector); |
158 let index = list.indexOf(filter); | 158 let index = list.indexOf(filter); |
159 if (index >= 0) | 159 if (index >= 0) |
160 list.splice(index, 1); | 160 list.splice(index, 1); |
161 } | 161 } |
162 // Unconditially applied element hiding filters | 162 // Unconditially applied element hiding filters |
163 else if (filterBySelector.get(filter.selector) === filter) | 163 else if (filterBySelector.get(filter.selector) == filter) |
Manish Jethani
2018/05/04 11:59:55
Looking at the code above, the value returned by f
kzar
2018/05/04 12:06:10
Done.
| |
164 { | 164 { |
165 filterBySelector.delete(filter.selector); | 165 filterBySelector.delete(filter.selector); |
166 unconditionalSelectors = null; | 166 unconditionalSelectors = null; |
167 } | 167 } |
168 // Conditionally applied element hiding filters | 168 // Conditionally applied element hiding filters |
169 else | 169 else |
170 { | 170 { |
171 let domains = filter.domains || defaultDomains; | 171 let domains = filter.domains || defaultDomains; |
172 for (let domain of domains.keys()) | 172 for (let domain of domains.keys()) |
173 { | 173 { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
282 if (currentDomain == "") | 282 if (currentDomain == "") |
283 break; | 283 break; |
284 | 284 |
285 let nextDot = currentDomain.indexOf("."); | 285 let nextDot = currentDomain.indexOf("."); |
286 currentDomain = nextDot == -1 ? "" : currentDomain.substr(nextDot + 1); | 286 currentDomain = nextDot == -1 ? "" : currentDomain.substr(nextDot + 1); |
287 } | 287 } |
288 | 288 |
289 return selectors; | 289 return selectors; |
290 } | 290 } |
291 }; | 291 }; |
LEFT | RIGHT |