Index: lib/content/elemHideEmulation.js |
=================================================================== |
--- a/lib/content/elemHideEmulation.js |
+++ b/lib/content/elemHideEmulation.js |
@@ -423,21 +423,21 @@ |
{ |
for (let style of styles) |
if (regexp.test(style.style)) |
for (let subSelector of style.subSelectors) |
{ |
if (subSelector.startsWith("*") && |
!incompletePrefixRegexp.test(prefix)) |
{ |
- subSelector = subSelector.substr(1); |
+ subSelector = subSelector.substring(1); |
} |
let idx = subSelector.lastIndexOf("::"); |
if (idx != -1) |
- subSelector = subSelector.substr(0, idx); |
+ subSelector = subSelector.substring(0, idx); |
yield qualifySelector(subSelector, prefix); |
} |
} |
*getSelectors(prefix, subtree, styles, targets) |
{ |
for (let selector of this.findPropsSelectors(styles, prefix, this._regexp)) |
yield [selector, subtree]; |
@@ -639,17 +639,17 @@ |
return []; |
let match = abpSelectorRegexp.exec(selector); |
if (!match) |
return [new PlainSelector(selector)]; |
let selectors = []; |
if (match.index > 0) |
- selectors.push(new PlainSelector(selector.substr(0, match.index))); |
+ selectors.push(new PlainSelector(selector.substring(0, match.index))); |
let startIndex = match.index + match[0].length; |
let content = parseSelectorContent(selector, startIndex); |
if (!content) |
{ |
console.error(new SyntaxError("Failed to parse Adblock Plus " + |
`selector ${selector} ` + |
"due to unmatched parentheses.")); |
@@ -670,17 +670,17 @@ |
{ |
// this is an error, can't parse selector. |
console.error(new SyntaxError("Failed to parse Adblock Plus " + |
`selector ${selector}, invalid ` + |
`pseudo-class :-abp-${match[1]}().`)); |
return null; |
} |
- let suffix = this.parseSelector(selector.substr(content.end + 1)); |
+ let suffix = this.parseSelector(selector.substring(content.end + 1)); |
if (suffix == null) |
return null; |
selectors.push(...suffix); |
if (selectors.length == 1 && selectors[0] instanceof ContainsSelector) |
{ |
console.error(new SyntaxError("Failed to parse Adblock Plus " + |