Skip to content

Commit 1492691

Browse files
committed
Add support for all list token in updater-link feature
Using `listkeys=all` will cause all enabled lists to be updated.
1 parent 4305ea9 commit 1492691

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/js/messaging.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -2115,9 +2115,12 @@ const onMessage = function(request, sender, callback) {
21152115
case 'updateLists':
21162116
const listkeys = request.listkeys.split(',').filter(s => s !== '');
21172117
if ( listkeys.length === 0 ) { return; }
2118-
for ( const listkey of listkeys ) {
2119-
io.purge(listkey);
2120-
io.remove(`compiled/${listkey}`);
2118+
if ( listkeys.includes('all') ) {
2119+
io.purge(/./, 'public_suffix_list.dat');
2120+
} else {
2121+
for ( const listkey of listkeys ) {
2122+
io.purge(listkey);
2123+
}
21212124
}
21222125
µb.scheduleAssetUpdater(0);
21232126
µb.openNewTab({

0 commit comments

Comments
 (0)