diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json index d1b66fa1b..5c8826760 100644 --- a/platform/chromium/manifest.json +++ b/platform/chromium/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.14.12", + "version": "1.14.14", "commands": { "launch-element-zapper": { diff --git a/src/js/cosmetic-filtering.js b/src/js/cosmetic-filtering.js index 3e4d56070..6020466c6 100644 --- a/src/js/cosmetic-filtering.js +++ b/src/js/cosmetic-filtering.js @@ -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)');