| 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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 * @param {string} [docDomain] domain name of the document that loads the URL | 864 * @param {string} [docDomain] domain name of the document that loads the URL |
| 865 * @param {boolean} [thirdParty] should be true if the URL is a third-party | 865 * @param {boolean} [thirdParty] should be true if the URL is a third-party |
| 866 * request | 866 * request |
| 867 * @param {string} [sitekey] public key provided by the document | 867 * @param {string} [sitekey] public key provided by the document |
| 868 * @return {boolean} true in case of a match | 868 * @return {boolean} true in case of a match |
| 869 */ | 869 */ |
| 870 matches(location, typeMask, docDomain, thirdParty, sitekey) | 870 matches(location, typeMask, docDomain, thirdParty, sitekey) |
| 871 { | 871 { |
| 872 return (this.contentType & typeMask) != 0 && | 872 return (this.contentType & typeMask) != 0 && |
| 873 (this.thirdParty == null || this.thirdParty == thirdParty) && | 873 (this.thirdParty == null || this.thirdParty == thirdParty) && |
| 874 this.matchesLocation(location) && | 874 (this.regexp ? (this.isActiveOnDomain(docDomain, sitekey) && |
| 875 this.isActiveOnDomain(docDomain, sitekey); | 875 this.matchesLocation(location)) : |
| 876 (this.matchesLocation(location) && |
| 877 this.isActiveOnDomain(docDomain, sitekey))); |
| 876 }, | 878 }, |
| 877 | 879 |
| 878 /** | 880 /** |
| 879 * Checks whether the given URL matches this filter without checking the | 881 * Checks whether the given URL matches this filter without checking the |
| 880 * filter's domains. | 882 * filter's domains. |
| 881 * @param {string} location | 883 * @param {string} location |
| 882 * @param {number} typeMask | 884 * @param {number} typeMask |
| 883 * @param {boolean} [thirdParty] | 885 * @param {boolean} [thirdParty] |
| 884 * @param {string} [sitekey] | 886 * @param {string} [sitekey] |
| 885 * @return {boolean} | 887 * @return {boolean} |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 | 1446 |
| 1445 /** | 1447 /** |
| 1446 * Script that should be executed | 1448 * Script that should be executed |
| 1447 * @type {string} | 1449 * @type {string} |
| 1448 */ | 1450 */ |
| 1449 get script() | 1451 get script() |
| 1450 { | 1452 { |
| 1451 return this.body; | 1453 return this.body; |
| 1452 } | 1454 } |
| 1453 }); | 1455 }); |
| LEFT | RIGHT |