| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 .replace("\\7B ", "{").replace("\\7D ", "}"); | 407 .replace("\\7B ", "{").replace("\\7D ", "}"); |
| 408 } | 408 } |
| 409 else | 409 else |
| 410 regexpString = filterToRegExp(propertyExpression); | 410 regexpString = filterToRegExp(propertyExpression); |
| 411 | 411 |
| 412 this._regexp = new RegExp(regexpString, "i"); | 412 this._regexp = new RegExp(regexpString, "i"); |
| 413 } | 413 } |
| 414 | 414 |
| 415 PropsSelector.prototype = { | 415 PropsSelector.prototype = { |
| 416 dependsOnStyles: true, | 416 dependsOnStyles: true, |
| 417 dependsOnDOM: true, |
| 417 | 418 |
| 418 *findPropsSelectors(styles, prefix, regexp) | 419 *findPropsSelectors(styles, prefix, regexp) |
| 419 { | 420 { |
| 420 for (let style of styles) | 421 for (let style of styles) |
| 421 if (regexp.test(style.style)) | 422 if (regexp.test(style.style)) |
| 422 for (let subSelector of style.subSelectors) | 423 for (let subSelector of style.subSelectors) |
| 423 { | 424 { |
| 424 if (subSelector.startsWith("*") && | 425 if (subSelector.startsWith("*") && |
| 425 !incompletePrefixRegexp.test(prefix)) | 426 !incompletePrefixRegexp.test(prefix)) |
| 426 { | 427 { |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 characterData: shouldObserveCharacterData(this.patterns), | 979 characterData: shouldObserveCharacterData(this.patterns), |
| 979 subtree: true | 980 subtree: true |
| 980 } | 981 } |
| 981 ); | 982 ); |
| 982 this.document.addEventListener("load", this.onLoad.bind(this), true); | 983 this.document.addEventListener("load", this.onLoad.bind(this), true); |
| 983 } | 984 } |
| 984 } | 985 } |
| 985 }; | 986 }; |
| 986 | 987 |
| 987 exports.ElemHideEmulation = ElemHideEmulation; | 988 exports.ElemHideEmulation = ElemHideEmulation; |
| OLD | NEW |