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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 * Maps type strings like "SCRIPT" or "OBJECT" to bit masks | 747 * Maps type strings like "SCRIPT" or "OBJECT" to bit masks |
748 */ | 748 */ |
749 RegExpFilter.typeMap = { | 749 RegExpFilter.typeMap = { |
750 OTHER: 1, | 750 OTHER: 1, |
751 SCRIPT: 2, | 751 SCRIPT: 2, |
752 IMAGE: 4, | 752 IMAGE: 4, |
753 STYLESHEET: 8, | 753 STYLESHEET: 8, |
754 OBJECT: 16, | 754 OBJECT: 16, |
755 SUBDOCUMENT: 32, | 755 SUBDOCUMENT: 32, |
756 DOCUMENT: 64, | 756 DOCUMENT: 64, |
| 757 WEBSOCKET: 128, |
757 XBL: 1, | 758 XBL: 1, |
758 PING: 1024, | 759 PING: 1024, |
759 XMLHTTPREQUEST: 2048, | 760 XMLHTTPREQUEST: 2048, |
760 OBJECT_SUBREQUEST: 4096, | 761 OBJECT_SUBREQUEST: 4096, |
761 DTD: 1, | 762 DTD: 1, |
762 MEDIA: 16384, | 763 MEDIA: 16384, |
763 FONT: 32768, | 764 FONT: 32768, |
764 | 765 |
765 BACKGROUND: 4, // Backwards compat, same as IMAGE | 766 BACKGROUND: 4, // Backwards compat, same as IMAGE |
766 | 767 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 // several times on Safari, due to WebKit bug 132872 | 1033 // several times on Safari, due to WebKit bug 132872 |
1033 let prop = Object.getOwnPropertyDescriptor(this, "regexpString"); | 1034 let prop = Object.getOwnPropertyDescriptor(this, "regexpString"); |
1034 if (prop) | 1035 if (prop) |
1035 return prop.value; | 1036 return prop.value; |
1036 | 1037 |
1037 let regexp = Filter.toRegExp(this.regexpSource); | 1038 let regexp = Filter.toRegExp(this.regexpSource); |
1038 Object.defineProperty(this, "regexpString", {value: regexp}); | 1039 Object.defineProperty(this, "regexpString", {value: regexp}); |
1039 return regexp; | 1040 return regexp; |
1040 } | 1041 } |
1041 }); | 1042 }); |
OLD | NEW |