| 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-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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 /** | 181 /** |
| 182 * Make a regular expression from a text argument. If it can be parsed as a | 182 * Make a regular expression from a text argument. If it can be parsed as a |
| 183 * regular expression, parse it and the flags. | 183 * regular expression, parse it and the flags. |
| 184 * @param {string} text the text argument. | 184 * @param {string} text the text argument. |
| 185 * @return {?RegExp} a RegExp object or null in case of error. | 185 * @return {?RegExp} a RegExp object or null in case of error. |
| 186 */ | 186 */ |
| 187 function makeRegExpParameter(text) | 187 function makeRegExpParameter(text) |
| 188 { | 188 { |
| 189 let [, pattern, flags] = | 189 let [, pattern, flags] = |
| 190 regexpRegexp.exec(text) || [undefined, textToRegExp(text)]; | 190 regexpRegexp.exec(text) || [null, textToRegExp(text)]; |
| 191 | 191 |
| 192 try | 192 try |
| 193 { | 193 { |
| 194 return new RegExp(pattern, flags); | 194 return new RegExp(pattern, flags); |
| 195 } | 195 } |
| 196 catch (e) | 196 catch (e) |
| 197 { | 197 { |
| 198 } | 198 } |
| 199 return null; | 199 return null; |
| 200 } | 200 } |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 characterData: shouldObserveCharacterData(this.patterns), | 865 characterData: shouldObserveCharacterData(this.patterns), |
| 866 subtree: true | 866 subtree: true |
| 867 } | 867 } |
| 868 ); | 868 ); |
| 869 this.document.addEventListener("load", this.onLoad.bind(this), true); | 869 this.document.addEventListener("load", this.onLoad.bind(this), true); |
| 870 } | 870 } |
| 871 } | 871 } |
| 872 }; | 872 }; |
| 873 | 873 |
| 874 exports.ElemHideEmulation = ElemHideEmulation; | 874 exports.ElemHideEmulation = ElemHideEmulation; |
| LEFT | RIGHT |