Left: | ||
Right: |
LEFT | RIGHT |
---|---|
(no file at all) | |
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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
798 if (this.sitekeySource) | 798 if (this.sitekeySource) |
799 { | 799 { |
800 sitekeys = this.sitekeySource.split("|"); | 800 sitekeys = this.sitekeySource.split("|"); |
801 this.sitekeySource = null; | 801 this.sitekeySource = null; |
802 } | 802 } |
803 | 803 |
804 Object.defineProperty( | 804 Object.defineProperty( |
805 this, "sitekeys", {value: sitekeys, enumerable: true} | 805 this, "sitekeys", {value: sitekeys, enumerable: true} |
806 ); | 806 ); |
807 return this.sitekeys; | 807 return this.sitekeys; |
808 }, | |
809 | |
810 /** | |
811 * Tests whether the filter only has a location. | |
812 * @return {boolean} | |
813 */ | |
814 isLocationOnly() | |
815 { | |
816 return this.contentType == RegExpFilter.prototype.contentType && | |
Manish Jethani
2018/10/24 21:35:28
I haven't run this code, but I'm pretty sure that
Jon Sonesen
2018/10/24 21:46:51
Ah, I see what you mean there. I didn't look deep
| |
817 this.thirdParty == null && !this.domains && !this.sitekeys; | |
808 }, | 818 }, |
809 | 819 |
810 /** | 820 /** |
811 * Tests whether the URL matches this filter | 821 * Tests whether the URL matches this filter |
812 * @param {string} location URL to be tested | 822 * @param {string} location URL to be tested |
813 * @param {number} typeMask bitmask of content / request types to match | 823 * @param {number} typeMask bitmask of content / request types to match |
814 * @param {string} [docDomain] domain name of the document that loads the URL | 824 * @param {string} [docDomain] domain name of the document that loads the URL |
815 * @param {boolean} [thirdParty] should be true if the URL is a third-party | 825 * @param {boolean} [thirdParty] should be true if the URL is a third-party |
816 * request | 826 * request |
817 * @param {string} [sitekey] public key provided by the document | 827 * @param {string} [sitekey] public key provided by the document |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1340 | 1350 |
1341 /** | 1351 /** |
1342 * Script that should be executed | 1352 * Script that should be executed |
1343 * @type {string} | 1353 * @type {string} |
1344 */ | 1354 */ |
1345 get script() | 1355 get script() |
1346 { | 1356 { |
1347 return this.body; | 1357 return this.body; |
1348 } | 1358 } |
1349 }); | 1359 }); |
LEFT | RIGHT |