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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 if (inverse) | 772 if (inverse) |
773 { | 773 { |
774 if (contentType == null) | 774 if (contentType == null) |
775 ({contentType} = RegExpFilter.prototype); | 775 ({contentType} = RegExpFilter.prototype); |
776 contentType &= ~type; | 776 contentType &= ~type; |
777 } | 777 } |
778 else | 778 else |
779 { | 779 { |
780 contentType |= type; | 780 contentType |= type; |
781 | 781 |
782 if (type == RegExpFilter.typeMap.CSP && value) | 782 if (type == RegExpFilter.typeMap.CSP) |
| 783 { |
| 784 if (!value) |
| 785 return new InvalidFilter(origText, "filter_invalid_csp"); |
783 csp = value; | 786 csp = value; |
784 else if (type == RegExpFilter.typeMap.CSP && !value) | 787 } |
785 return new InvalidFilter(origText, "filter_invalid_csp"); | |
786 } | 788 } |
787 } | 789 } |
788 else | 790 else |
789 { | 791 { |
790 switch (option.toLowerCase()) | 792 switch (option.toLowerCase()) |
791 { | 793 { |
792 case "match-case": | 794 case "match-case": |
793 matchCase = !inverse; | 795 matchCase = !inverse; |
794 break; | 796 break; |
795 case "domain": | 797 case "domain": |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 | 1171 |
1170 /** | 1172 /** |
1171 * Script that should be executed | 1173 * Script that should be executed |
1172 * @type {string} | 1174 * @type {string} |
1173 */ | 1175 */ |
1174 get script() | 1176 get script() |
1175 { | 1177 { |
1176 return this.body; | 1178 return this.body; |
1177 } | 1179 } |
1178 }); | 1180 }); |
LEFT | RIGHT |