Skip to content

Commit

Permalink
Add support for all list token in updater-link feature
Browse files Browse the repository at this point in the history
Using `listkeys=all` will cause all enabled lists to be updated.
  • Loading branch information
gorhill committed Dec 12, 2023
1 parent 4305ea9 commit 1492691
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/js/messaging.js
Expand Up @@ -2115,9 +2115,12 @@ const onMessage = function(request, sender, callback) {
case 'updateLists':
const listkeys = request.listkeys.split(',').filter(s => s !== '');
if ( listkeys.length === 0 ) { return; }
for ( const listkey of listkeys ) {
io.purge(listkey);
io.remove(`compiled/${listkey}`);
if ( listkeys.includes('all') ) {
io.purge(/./, 'public_suffix_list.dat');
} else {
for ( const listkey of listkeys ) {
io.purge(listkey);
}
}
µb.scheduleAssetUpdater(0);
µb.openNewTab({
Expand Down

0 comments on commit 1492691

Please sign in to comment.