| 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 return (key in filterByKey ? filterByKey[key] : null); | 371 return (key in filterByKey ? filterByKey[key] : null); |
| 372 }, | 372 }, |
| 373 | 373 |
| 374 /** | 374 /** |
| 375 * Returns a list of all selectors active on a particular domain (currently | 375 * Returns a list of all selectors active on a particular domain (currently |
| 376 * used only in Chrome, Opera and Safari). | 376 * used only in Chrome, Opera and Safari). |
| 377 */ | 377 */ |
| 378 getSelectorsForDomain: function(/**String*/ domain, /**Boolean*/ specificOnly) | 378 getSelectorsForDomain: function(/**String*/ domain, /**Boolean*/ specificOnly) |
| 379 { | 379 { |
| 380 let result = []; | 380 let result = []; |
| 381 for (let key in filterByKey) | 381 let keys = Object.getOwnPropertyNames(filterByKey); |
| 382 for (let key of keys) |
| 382 { | 383 { |
| 383 let filter = filterByKey[key]; | 384 let filter = filterByKey[key]; |
| 384 if (specificOnly && (!filter.domains || filter.domains[""])) | 385 if (specificOnly && (!filter.domains || filter.domains[""])) |
| 385 continue; | 386 continue; |
| 386 | 387 |
| 387 if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain)) | 388 if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain)) |
| 388 result.push(filter.selector); | 389 result.push(filter.selector); |
| 389 } | 390 } |
| 390 return result; | 391 return result; |
| 391 } | 392 } |
| 392 }; | 393 }; |
| OLD | NEW |