diff --git a/src/js/background.js b/src/js/background.js index d3fcae4a1eaa0..4025006948163 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -50,7 +50,7 @@ const hiddenSettingsDefault = { autoCommentFilterTemplate: '{{date}} {{origin}}', autoUpdateAssetFetchPeriod: 60, autoUpdateDelayAfterLaunch: 105, - autoUpdatePeriod: 4, + autoUpdatePeriod: 2, benchmarkDatasetURL: 'unset', blockingProfiles: '11111/#F00 11010/#C0F 11001/#00F 00001', cacheStorageAPI: 'unset', diff --git a/src/js/storage.js b/src/js/storage.js index ba535434a2e58..236be9e4dfdd9 100644 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -1481,9 +1481,13 @@ self.addEventListener('hiddenSettingsChanged', ( ) => { const now = Date.now(); let needEmergencyUpdate = false; - for ( const asset of Object.values(assetDict) ) { + for ( const [ assetKey, asset ] of Object.entries(assetDict) ) { if ( asset.hasRemoteURL !== true ) { continue; } - if ( asset.content === 'filters' && asset.off === true ) { continue; } + if ( asset.content === 'filters' ) { + if ( µb.selectedFilterLists.includes(assetKey) === false ) { + continue; + } + } if ( asset.obsolete !== true ) { continue; } const lastUpdateInDays = (now - asset.writeTime) / 86400000; const daysSinceVeryObsolete = lastUpdateInDays - 2 * asset.updateAfter; @@ -1602,7 +1606,9 @@ self.addEventListener('hiddenSettingsChanged', ( ) => { this.loadFilterLists(); } if ( this.userSettings.autoUpdate ) { - this.scheduleAssetUpdater(this.hiddenSettings.autoUpdatePeriod * 3600000 || 25200000); + this.scheduleAssetUpdater( + this.hiddenSettings.autoUpdatePeriod * 3600000 || 25200000 + ); } else { this.scheduleAssetUpdater(0); }