mirror of https://github.com/gorhill/uBlock.git
fix #2594
This commit is contained in:
parent
be07567f20
commit
1c7c703d8b
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue