diff --git a/platform/common/vapi-background.js b/platform/common/vapi-background.js index 0c4b0b46d..0d3cc584e 100644 --- a/platform/common/vapi-background.js +++ b/platform/common/vapi-background.js @@ -45,13 +45,6 @@ if ( vAPI.canWASM === false ) { vAPI.supportsUserStylesheets = vAPI.webextFlavor.soup.has('user_stylesheet'); -// The real actual webextFlavor value may not be set in stone, so listen -// for possible future changes. -window.addEventListener('webextFlavor', function() { - vAPI.supportsUserStylesheets = - vAPI.webextFlavor.soup.has('user_stylesheet'); -}, { once: true }); - /******************************************************************************/ vAPI.app = { diff --git a/platform/common/vapi-common.js b/platform/common/vapi-common.js index 552642b7d..e9f00dc62 100644 --- a/platform/common/vapi-common.js +++ b/platform/common/vapi-common.js @@ -83,12 +83,9 @@ vAPI.webextFlavor = { // Synchronous -- order of tests is important const match = /\bChrom(?:e|ium)\/([\d.]+)/.exec(ua); if ( match !== null ) { - soup.add('chromium'); + soup.add('chromium') + .add('user_stylesheet'); flavor.major = parseInt(match[1], 10) || 0; - // https://github.com/gorhill/uBlock/issues/3588 - if ( flavor.major >= 66 ) { - soup.add('user_stylesheet'); - } } // Don't starve potential listeners