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-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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 167 } |
168 } | 168 } |
169 }; | 169 }; |
170 | 170 |
171 modules.filterClasses = { | 171 modules.filterClasses = { |
172 BlockingFilter: function() {}, | 172 BlockingFilter: function() {}, |
173 Filter: function(text) | 173 Filter: function(text) |
174 { | 174 { |
175 this.text = text; | 175 this.text = text; |
176 this.disabled = false; | 176 this.disabled = false; |
177 } | 177 }, |
| 178 RegExpFilter: function() {} |
178 }; | 179 }; |
179 modules.filterClasses.Filter.fromText = function(text) | 180 modules.filterClasses.Filter.fromText = function(text) |
180 { | 181 { |
181 return new modules.filterClasses.Filter(text); | 182 return new modules.filterClasses.Filter(text); |
182 }; | 183 }; |
| 184 modules.filterClasses.RegExpFilter.typeMap = Object.create(null); |
183 | 185 |
184 modules.filterValidation = | 186 modules.filterValidation = |
185 { | 187 { |
186 parseFilter: function(text) | 188 parseFilter: function(text) |
187 { | 189 { |
188 if (params.filterError) | 190 if (params.filterError) |
189 return {error: "Invalid filter"}; | 191 return {error: "Invalid filter"}; |
190 return {filter: modules.filterClasses.Filter.fromText(text)}; | 192 return {filter: modules.filterClasses.Filter.fromText(text)}; |
191 }, | 193 }, |
192 parseFilters: function(text) | 194 parseFilters: function(text) |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 }, | 413 }, |
412 filter: { | 414 filter: { |
413 text: "||example.com/some-annoying-popup$popup", | 415 text: "||example.com/some-annoying-popup$popup", |
414 whitelisted: false, | 416 whitelisted: false, |
415 userDefined: true, | 417 userDefined: true, |
416 subscription: null | 418 subscription: null |
417 } | 419 } |
418 }); | 420 }); |
419 }); | 421 }); |
420 })(this); | 422 })(this); |
LEFT | RIGHT |