mirror of
https://github.com/davegallant/rfd-redirect-stripper.git
synced 2025-08-07 00:58:14 +00:00
Start to consolidate source code for both browsers
This commit is contained in:
22
js/utils.js
Normal file
22
js/utils.js
Normal 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",
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user