mirror of
https://github.com/davegallant/rfd-redirect-stripper.git
synced 2025-08-07 09:02:30 +00:00
Add popup that allows modifying the config url
This commit is contained in:
22
extensions/chrome/utils.js
Normal file
22
extensions/chrome/utils.js
Normal file
@@ -0,0 +1,22 @@
|
||||
function updateRedirects() {
|
||||
chrome.storage.local.get("config", function (URL) {
|
||||
fetch(URL.config)
|
||||
.then((res) => res.json())
|
||||
.then((res) => {
|
||||
chrome.storage.local
|
||||
.set({
|
||||
redirects: res,
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function setDefaultConfig() {
|
||||
chrome.storage.local.set({
|
||||
config:
|
||||
"https://raw.githubusercontent.com/davegallant/rfd-redirect-stripper/main/redirects.json",
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user