diff --git a/src/js/assets.js b/src/js/assets.js index 031df881b..09dffbc2f 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -1007,7 +1007,12 @@ var updateNext = function() { if ( cacheEntry && (cacheEntry.writeTime + assetEntry.updateAfter * 86400000) > now ) { continue; } - if ( fireNotification('before-asset-updated', { assetKey: assetKey }) !== false ) { + if ( + fireNotification( + 'before-asset-updated', + { assetKey: assetKey, type: assetEntry.content } + ) !== false + ) { return assetKey; } garbageCollectOne(assetKey); diff --git a/src/js/storage.js b/src/js/storage.js index 9c8626e7d..4e1440077 100644 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -1059,11 +1059,22 @@ µBlock.assetObserver = function(topic, details) { // Do not update filter list if not in use. if ( topic === 'before-asset-updated' ) { - if ( - this.availableFilterLists.hasOwnProperty(details.assetKey) && - this.selectedFilterLists.indexOf(details.assetKey) === -1 - ) { - return false; + if ( details.type === 'filters' ) { + if ( + this.availableFilterLists.hasOwnProperty(details.assetKey) === false || + this.selectedFilterLists.indexOf(details.assetKey) === -1 + ) { + return false; + } + } + // https://github.com/gorhill/uBlock/issues/2594 + if ( details.assetKey === 'ublock-resources' ) { + if ( + this.hiddenSettings.ignoreRedirectFilters === true && + this.hiddenSettings.ignoreScriptInjectFilters === true + ) { + return false; + } } return; }