From 14926913f7b7ffa111ac39a67cad6dfa80d4d4fc Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 12 Dec 2023 11:04:16 -0500 Subject: [PATCH] Add support for `all` list token in updater-link feature Using `listkeys=all` will cause all enabled lists to be updated. --- src/js/messaging.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/js/messaging.js b/src/js/messaging.js index 64098c9eb8545..eae8607b5b4d7 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -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({