Start to consolidate source code for both browsers

This commit is contained in:
Dave Gallant
2023-04-09 16:01:01 -04:00
parent c099bddf0d
commit 6abdd3ebbe
13 changed files with 5565 additions and 21 deletions

22
js/utils.js Normal file
View File

@@ -0,0 +1,22 @@
function updateRedirects() {
browser.storage.local.get("config", function (URL) {
fetch(URL.config)
.then((res) => res.json())
.then((res) => {
browser.storage.local
.set({
redirects: res,
})
.catch((error) => {
console.log(error);
});
});
});
}
function setDefaultConfig() {
browser.storage.local.set({
config:
"https://raw.githubusercontent.com/davegallant/rfd-redirect-stripper/main/redirects.json",
});
}