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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 * for delayed creation of the regexp property | 655 * for delayed creation of the regexp property |
656 * @type {string} | 656 * @type {string} |
657 */ | 657 */ |
658 regexpSource: null, | 658 regexpSource: null, |
659 /** | 659 /** |
660 * Regular expression to be used when testing against this filter | 660 * Regular expression to be used when testing against this filter |
661 * @type {RegExp} | 661 * @type {RegExp} |
662 */ | 662 */ |
663 get regexp() | 663 get regexp() |
664 { | 664 { |
665 let source = Filter.toRegExp(this.regexpSource); | 665 let source = Filter.toRegExp(this.regexpSource, this.rewrite == null); |
666 let regexp = new RegExp(source, this.matchCase ? "" : "i"); | 666 let regexp = new RegExp(source, this.matchCase ? "" : "i"); |
667 Object.defineProperty(this, "regexp", {value: regexp}); | 667 Object.defineProperty(this, "regexp", {value: regexp}); |
668 this.regexpSource = null; | 668 this.regexpSource = null; |
669 return regexp; | 669 return regexp; |
670 }, | 670 }, |
671 /** | 671 /** |
672 * Content types the filter applies to, combination of values from | 672 * Content types the filter applies to, combination of values from |
673 * RegExpFilter.typeMap | 673 * RegExpFilter.typeMap |
674 * @type {number} | 674 * @type {number} |
675 */ | 675 */ |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 | 1187 |
1188 /** | 1188 /** |
1189 * Script that should be executed | 1189 * Script that should be executed |
1190 * @type {string} | 1190 * @type {string} |
1191 */ | 1191 */ |
1192 get script() | 1192 get script() |
1193 { | 1193 { |
1194 return this.body; | 1194 return this.body; |
1195 } | 1195 } |
1196 }); | 1196 }); |
OLD | NEW |