mirror of https://github.com/gorhill/uBlock.git
Prefer CDNs when subscribing to a new list
Also, purging the cache of a list should not remove the compiled version of that list so that it keep being seen as cached, but obsolete.
This commit is contained in:
parent
ae24032607
commit
3ff456a63d
|
@ -292,7 +292,7 @@ const renderWidgets = ( ) => {
|
||||||
dom.cl.toggle('#buttonUpdate', 'active', updating);
|
dom.cl.toggle('#buttonUpdate', 'active', updating);
|
||||||
dom.cl.toggle('#buttonUpdate', 'disabled',
|
dom.cl.toggle('#buttonUpdate', 'disabled',
|
||||||
updating === false &&
|
updating === false &&
|
||||||
qs$('#lists .listEntry.checked.obsolete:not(.toRemove)') === null
|
qs$('#lists .listEntry.checked.obsolete.cached:not(.toRemove)') === null
|
||||||
);
|
);
|
||||||
dom.cl.toggle('#buttonPurgeAll', 'disabled',
|
dom.cl.toggle('#buttonPurgeAll', 'disabled',
|
||||||
updating || qs$('#lists .listEntry.cached:not(.obsolete)') === null
|
updating || qs$('#lists .listEntry.cached:not(.obsolete)') === null
|
||||||
|
@ -519,7 +519,6 @@ const onPurgeClicked = ev => {
|
||||||
// An external filter list must not be marked as obsolete, they will
|
// An external filter list must not be marked as obsolete, they will
|
||||||
// always be fetched anyways if there is no cached copy.
|
// always be fetched anyways if there is no cached copy.
|
||||||
dom.cl.add(liEntry, 'obsolete');
|
dom.cl.add(liEntry, 'obsolete');
|
||||||
dom.cl.remove(liEntry, 'cached');
|
|
||||||
|
|
||||||
if ( qs$(liEntry, 'input[type="checkbox"]').checked ) {
|
if ( qs$(liEntry, 'input[type="checkbox"]').checked ) {
|
||||||
renderWidgets();
|
renderWidgets();
|
||||||
|
|
|
@ -1262,7 +1262,7 @@ async function diffUpdater() {
|
||||||
} else if ( data.error ) {
|
} else if ( data.error ) {
|
||||||
ubolog(`Diff updater: failed to update ${data.name} using ${data.patchPath}, reason: ${data.error}`);
|
ubolog(`Diff updater: failed to update ${data.name} using ${data.patchPath}, reason: ${data.error}`);
|
||||||
} else if ( data.status === 'nopatch-yet' || data.status === 'nodiff' ) {
|
} else if ( data.status === 'nopatch-yet' || data.status === 'nodiff' ) {
|
||||||
ubolog(`Diff updater: Skip update of ${data.name} using ${data.patchPath}, reason: ${data.status}`);
|
ubolog(`Diff updater: skip update of ${data.name} using ${data.patchPath}, reason: ${data.status}`);
|
||||||
assetCacheSetDetails(data.name, {
|
assetCacheSetDetails(data.name, {
|
||||||
writeTime: data.lastModified || 0
|
writeTime: data.lastModified || 0
|
||||||
});
|
});
|
||||||
|
|
|
@ -1633,7 +1633,6 @@ const onMessage = function(request, sender, callback) {
|
||||||
case 'purgeCaches':
|
case 'purgeCaches':
|
||||||
for ( const assetKey of request.assetKeys ) {
|
for ( const assetKey of request.assetKeys ) {
|
||||||
io.purge(assetKey);
|
io.purge(assetKey);
|
||||||
io.remove(`compiled/${assetKey}`);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue