mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
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 ) {
|
if ( cacheEntry && (cacheEntry.writeTime + assetEntry.updateAfter * 86400000) > now ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( fireNotification('before-asset-updated', { assetKey: assetKey }) !== false ) {
|
if (
|
||||||
|
fireNotification(
|
||||||
|
'before-asset-updated',
|
||||||
|
{ assetKey: assetKey, type: assetEntry.content }
|
||||||
|
) !== false
|
||||||
|
) {
|
||||||
return assetKey;
|
return assetKey;
|
||||||
}
|
}
|
||||||
garbageCollectOne(assetKey);
|
garbageCollectOne(assetKey);
|
||||||
|
@ -1059,12 +1059,23 @@
|
|||||||
µBlock.assetObserver = function(topic, details) {
|
µBlock.assetObserver = function(topic, details) {
|
||||||
// Do not update filter list if not in use.
|
// Do not update filter list if not in use.
|
||||||
if ( topic === 'before-asset-updated' ) {
|
if ( topic === 'before-asset-updated' ) {
|
||||||
|
if ( details.type === 'filters' ) {
|
||||||
if (
|
if (
|
||||||
this.availableFilterLists.hasOwnProperty(details.assetKey) &&
|
this.availableFilterLists.hasOwnProperty(details.assetKey) === false ||
|
||||||
this.selectedFilterLists.indexOf(details.assetKey) === -1
|
this.selectedFilterLists.indexOf(details.assetKey) === -1
|
||||||
) {
|
) {
|
||||||
return false;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user