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-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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 } | 252 } |
253 }; | 253 }; |
254 | 254 |
255 function PropsSelector(propertyExpression) | 255 function PropsSelector(propertyExpression) |
256 { | 256 { |
257 let regexpString; | 257 let regexpString; |
258 if (propertyExpression.length >= 2 && propertyExpression[0] == "/" && | 258 if (propertyExpression.length >= 2 && propertyExpression[0] == "/" && |
259 propertyExpression[propertyExpression.length - 1] == "/") | 259 propertyExpression[propertyExpression.length - 1] == "/") |
260 { | 260 { |
261 regexpString = propertyExpression.slice(1, -1) | 261 regexpString = propertyExpression.slice(1, -1) |
262 .replace("\\x7B ", "{").replace("\\x7D ", "}"); | 262 .replace("\\7B ", "{").replace("\\7D ", "}"); |
263 } | 263 } |
264 else | 264 else |
265 regexpString = filterToRegExp(propertyExpression); | 265 regexpString = filterToRegExp(propertyExpression); |
266 | 266 |
267 this._regexp = new RegExp(regexpString, "i"); | 267 this._regexp = new RegExp(regexpString, "i"); |
268 } | 268 } |
269 | 269 |
270 PropsSelector.prototype = { | 270 PropsSelector.prototype = { |
271 preferHideWithSelector: true, | 271 preferHideWithSelector: true, |
272 dependsOnStyles: true, | 272 dependsOnStyles: true, |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 characterData: true, | 591 characterData: true, |
592 subtree: true | 592 subtree: true |
593 } | 593 } |
594 ); | 594 ); |
595 this.document.addEventListener("load", this.onLoad.bind(this), true); | 595 this.document.addEventListener("load", this.onLoad.bind(this), true); |
596 } | 596 } |
597 } | 597 } |
598 }; | 598 }; |
599 | 599 |
600 exports.ElemHideEmulation = ElemHideEmulation; | 600 exports.ElemHideEmulation = ElemHideEmulation; |
OLD | NEW |