mirror of
https://github.com/davegallant/rfd-redirect-stripper.git
synced 2025-08-10 02:22:27 +00:00
Add firefox extension
This commit is contained in:
18
extensions/firefox/background.js
Normal file
18
extensions/firefox/background.js
Normal file
@@ -0,0 +1,18 @@
|
||||
function updateRedirects() {
|
||||
var URL =
|
||||
"https://raw.githubusercontent.com/davegallant/rfd-redirect-stripper/main/redirects.json";
|
||||
|
||||
fetch(URL)
|
||||
.then((res) => res.json())
|
||||
.then((res) => {
|
||||
browser.storage.local.set({
|
||||
"rfd-redirects": res,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
chrome.runtime.onInstalled.addListener(() => {
|
||||
updateRedirects();
|
||||
});
|
||||
|
||||
setInterval(updateRedirects, 1 * 60 * 60 * 1000);
|
Reference in New Issue
Block a user