mirror of
https://github.com/davegallant/rfd-redirect-stripper.git
synced 2025-08-05 08:13:40 +00:00
Add Chrome support (#15)
* add chrome support * fix alarms * Add tkqlhce.com (#12) * add tkqlhce.com * add match at beginning of regex * formatting * set config needs to come first * still need background.scripts for firefox * need full path * add onStartup listener to ensure alarm is created * set time to 60 * add manifest specific to chrome and bump version
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { updateRedirects, setDefaultConfig } from "../js/utils.js"
|
||||
|
||||
const inputField = document.getElementById("input-field");
|
||||
const saveButton = document.getElementById("save-button");
|
||||
const resetButton = document.getElementById("reset-button");
|
||||
@@ -5,7 +7,7 @@ const resetButton = document.getElementById("reset-button");
|
||||
const defaultConfig =
|
||||
"https://raw.githubusercontent.com/davegallant/rfd-redirect-stripper/main/redirects.json";
|
||||
|
||||
browser.storage.local.get("config").then((result) => {
|
||||
chrome.storage.local.get("config").then((result) => {
|
||||
const value = result.config;
|
||||
if (value) {
|
||||
inputField.value = value;
|
||||
@@ -14,7 +16,7 @@ browser.storage.local.get("config").then((result) => {
|
||||
|
||||
saveButton.addEventListener("click", () => {
|
||||
const value = inputField.value;
|
||||
browser.storage.local.set({ config: value });
|
||||
chrome.storage.local.set({ config: value });
|
||||
updateRedirects();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user