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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 } | 342 } |
343 } | 343 } |
344 | 344 |
345 class ContainsSelector | 345 class ContainsSelector |
346 { | 346 { |
347 constructor(textContent) | 347 constructor(textContent) |
348 { | 348 { |
349 this.dependsOnDOM = true; | 349 this.dependsOnDOM = true; |
350 this.dependsOnCharacterData = true; | 350 this.dependsOnCharacterData = true; |
351 | 351 |
352 this._regexp = makeRegExpParameter(textContent); | 352 this._regexp = makeRegExpParameter( |
| 353 textContent.replace("\\7B ", "{").replace("\\7D ", "}")); |
353 } | 354 } |
354 | 355 |
355 *getSelectors(prefix, subtree, styles, targets) | 356 *getSelectors(prefix, subtree, styles, targets) |
356 { | 357 { |
357 for (let element of this.getElements(prefix, subtree, styles, targets)) | 358 for (let element of this.getElements(prefix, subtree, styles, targets)) |
358 yield [makeSelector(element), subtree]; | 359 yield [makeSelector(element), subtree]; |
359 } | 360 } |
360 | 361 |
361 *getElements(prefix, subtree, styles, targets) | 362 *getElements(prefix, subtree, styles, targets) |
362 { | 363 { |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 characterData: shouldObserveCharacterData(this.patterns), | 966 characterData: shouldObserveCharacterData(this.patterns), |
966 subtree: true | 967 subtree: true |
967 } | 968 } |
968 ); | 969 ); |
969 this.document.addEventListener("load", this.onLoad.bind(this), true); | 970 this.document.addEventListener("load", this.onLoad.bind(this), true); |
970 } | 971 } |
971 } | 972 } |
972 } | 973 } |
973 | 974 |
974 exports.ElemHideEmulation = ElemHideEmulation; | 975 exports.ElemHideEmulation = ElemHideEmulation; |
OLD | NEW |