This commit is contained in:
gorhill 2017-10-08 23:47:23 -04:00
parent 3d0cdc38b9
commit 8c33720d16
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 9 additions and 1 deletions

View File

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "uBlock Origin",
"version": "1.14.12",
"version": "1.14.14",
"commands": {
"launch-element-zapper": {

View File

@ -51,6 +51,14 @@ var isValidCSSSelector = (function() {
} else {
matchesFn = div.querySelector.bind(div);
}
// https://github.com/gorhill/uBlock/issues/3111
// Workaround until https://bugzilla.mozilla.org/show_bug.cgi?id=1406817
// is fixed.
try {
matchesFn(':scope');
} catch (ex) {
matchesFn = div.querySelector.bind(div);
}
return function(s) {
try {
matchesFn(s + ', ' + s + ':not(#foo)');