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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 /** | 78 /** |
79 * Cache for known filters, maps string representation to filter objects. | 79 * Cache for known filters, maps string representation to filter objects. |
80 * @type Object | 80 * @type Object |
81 */ | 81 */ |
82 Filter.knownFilters = Object.create(null); | 82 Filter.knownFilters = Object.create(null); |
83 | 83 |
84 /** | 84 /** |
85 * Regular expression that element hiding filters should match | 85 * Regular expression that element hiding filters should match |
86 * @type RegExp | 86 * @type RegExp |
87 */ | 87 */ |
88 Filter.elemhideRegExp = /^([^\/\*\|\@"!]*?)#(\@)?(?:([\w\-]+|\*)((?:\([\w\-]+(?:
[$^*]?=[^\(\)"]*)?\))*)|#([^{}]+))$/; | 88 Filter.elemhideRegExp = /^([^\/\*\|\@"!]*?)#(\@)?(?:([\w\-]+|\*)((?:\([\w\-]+(?:
[$^*]?=[^\(\)"]*)?\))*)|#((?:[^{}]|(?:\[[\w-]+[~|]?=(['"])[^'"]*?\6\]))+))$/; |
89 /** | 89 /** |
90 * Regular expression that RegExp filters specified as RegExps should match | 90 * Regular expression that RegExp filters specified as RegExps should match |
91 * @type RegExp | 91 * @type RegExp |
92 */ | 92 */ |
93 Filter.regexpRegExp = /^(@@)?\/.*\/(?:\$~?[\w\-]+(?:=[^,\s]+)?(?:,~?[\w\-]+(?:=[
^,\s]+)?)*)?$/; | 93 Filter.regexpRegExp = /^(@@)?\/.*\/(?:\$~?[\w\-]+(?:=[^,\s]+)?(?:,~?[\w\-]+(?:=[
^,\s]+)?)*)?$/; |
94 /** | 94 /** |
95 * Regular expression that options on a RegExp filter should match | 95 * Regular expression that options on a RegExp filter should match |
96 * @type RegExp | 96 * @type RegExp |
97 */ | 97 */ |
98 Filter.optionsRegExp = /\$(~?[\w\-]+(?:=[^,\s]+)?(?:,~?[\w\-]+(?:=[^,\s]+)?)*)$/
; | 98 Filter.optionsRegExp = /\$(~?[\w\-]+(?:=[^,\s]+)?(?:,~?[\w\-]+(?:=[^,\s]+)?)*)$/
; |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 */ | 971 */ |
972 function ElemHideEmulationFilter(text, domains, selector) | 972 function ElemHideEmulationFilter(text, domains, selector) |
973 { | 973 { |
974 ElemHideBase.call(this, text, domains, selector); | 974 ElemHideBase.call(this, text, domains, selector); |
975 } | 975 } |
976 exports.ElemHideEmulationFilter = ElemHideEmulationFilter; | 976 exports.ElemHideEmulationFilter = ElemHideEmulationFilter; |
977 | 977 |
978 ElemHideEmulationFilter.prototype = extend(ElemHideBase, { | 978 ElemHideEmulationFilter.prototype = extend(ElemHideBase, { |
979 type: "elemhideemulation" | 979 type: "elemhideemulation" |
980 }); | 980 }); |
OLD | NEW |