From 34cca8349b78ca34ca9b385e26defeea2c829a58 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 18 Mar 2022 13:27:07 -0400 Subject: [PATCH] Do not always convert removed stock list into imported list If the removed stock list is labelled a "bad list", do not convert it into an imported list. This will allow to seamlessly merge resource-abuse stock list with privacy stock list when 1.42.0 is widespread. --- src/js/storage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/storage.js b/src/js/storage.js index 7c505ab0e..4d29fc85d 100644 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -645,7 +645,8 @@ self.addEventListener('hiddenSettingsChanged', ( ) => { io.registerAssetSource(listKey, entry); } - // Convert a no longer existing stock list into an imported list. + // Convert a no longer existing stock list into an imported list, except + // when the removed stock list is deemed a "bad list". const customListFromStockList = assetKey => { const oldEntry = oldAvailableLists[assetKey]; if ( oldEntry === undefined || oldEntry.off === true ) { return; } @@ -653,6 +654,7 @@ self.addEventListener('hiddenSettingsChanged', ( ) => { if ( Array.isArray(listURL) ) { listURL = listURL[0]; } + if ( this.badLists.has(listURL) ) { return; } const newEntry = { content: 'filters', contentURL: listURL,