| OLD | NEW | 
|    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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  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       { | 
|  174         let filters = filtersByDomain.get(domain); |  174         let filters = filtersByDomain.get(domain); | 
|  175         if (filters) |  175         if (filters) | 
 |  176         { | 
|  176           filters.delete(filter); |  177           filters.delete(filter); | 
 |  178  | 
 |  179           if (filters.size == 0) | 
 |  180             filtersByDomain.delete(domain); | 
 |  181         } | 
|  177       } |  182       } | 
|  178     } |  183     } | 
|  179  |  184  | 
|  180     knownFilters.delete(filter); |  185     knownFilters.delete(filter); | 
|  181     FilterNotifier.emit("elemhideupdate"); |  186     FilterNotifier.emit("elemhideupdate"); | 
|  182   }, |  187   }, | 
|  183  |  188  | 
|  184   /** |  189   /** | 
|  185    * Determines from the current filter list which selectors should be applied |  190    * Determines from the current filter list which selectors should be applied | 
|  186    * on a particular host name. |  191    * on a particular host name. | 
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  229       let nextDot = currentDomain.indexOf("."); |  234       let nextDot = currentDomain.indexOf("."); | 
|  230       currentDomain = nextDot == -1 ? "" : currentDomain.substr(nextDot + 1); |  235       currentDomain = nextDot == -1 ? "" : currentDomain.substr(nextDot + 1); | 
|  231     } |  236     } | 
|  232  |  237  | 
|  233     if (!specificOnly) |  238     if (!specificOnly) | 
|  234       selectors = getUnconditionalSelectors().concat(selectors); |  239       selectors = getUnconditionalSelectors().concat(selectors); | 
|  235  |  240  | 
|  236     return selectors; |  241     return selectors; | 
|  237   } |  242   } | 
|  238 }; |  243 }; | 
| OLD | NEW |