-
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove Google Cache and Yahoo Cache
Closes #90.
- Loading branch information
Showing
12 changed files
with
42 additions
and
204 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/storage/revisions/local/20240928183956_remove_search_engines.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const message = 'Remove search engines'; | ||
|
||
const revision = '20240928183956_remove_search_engines'; | ||
|
||
async function upgrade(context) { | ||
const changes = {}; | ||
const {engines, disabledEngines} = await browser.storage.local.get([ | ||
'engines', | ||
'disabledEngines' | ||
]); | ||
|
||
const removeEngines = ['google', 'googleText', 'yahoo']; | ||
const enableEngines = []; | ||
|
||
if (context.install) { | ||
enableEngines.push('ghostarchive', 'webcite'); | ||
} | ||
|
||
changes.engines = engines.filter(function (item) { | ||
return !removeEngines.includes(item); | ||
}); | ||
changes.disabledEngines = disabledEngines.filter(function (item) { | ||
return !removeEngines.includes(item) && !enableEngines.includes(item); | ||
}); | ||
|
||
changes.storageVersion = revision; | ||
return browser.storage.local.set(changes); | ||
} | ||
|
||
export {message, revision, upgrade}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.