Remove test for whether Chromium version is less than 66

The test is no longer needed given that the minimum supported
version is Chromium 66.
This commit is contained in:
Raymond Hill 2022-02-17 09:07:56 -05:00
parent ff52919cfc
commit 3154ed1bac
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 2 additions and 12 deletions

View File

@ -45,13 +45,6 @@ if ( vAPI.canWASM === false ) {
vAPI.supportsUserStylesheets = vAPI.webextFlavor.soup.has('user_stylesheet'); 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 = { vAPI.app = {

View File

@ -83,12 +83,9 @@ vAPI.webextFlavor = {
// Synchronous -- order of tests is important // Synchronous -- order of tests is important
const match = /\bChrom(?:e|ium)\/([\d.]+)/.exec(ua); const match = /\bChrom(?:e|ium)\/([\d.]+)/.exec(ua);
if ( match !== null ) { if ( match !== null ) {
soup.add('chromium'); soup.add('chromium')
.add('user_stylesheet');
flavor.major = parseInt(match[1], 10) || 0; 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 // Don't starve potential listeners