diff options
author | Mark Powers <mark@marks.kitchen> | 2022-12-29 14:03:57 -0600 |
---|---|---|
committer | Mark Powers <mark@marks.kitchen> | 2022-12-29 14:03:57 -0600 |
commit | b5c10718ddeaa8fcac368515ca150705b1a2c5ab (patch) | |
tree | 473c6b8197774ed3a29df73821c404381535ccbc /options.js | |
parent | ff9f53e5673d742d155881a2a29f31ba312dce9c (diff) |
Refactor scripts, add table preview
Diffstat (limited to 'options.js')
-rw-r--r-- | options.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/options.js b/options.js deleted file mode 100644 index 3d85dbe..0000000 --- a/options.js +++ /dev/null @@ -1,23 +0,0 @@ -function saveOptions(e) { - e.preventDefault(); - browser.storage.sync.set({ - rb: document.querySelector("#rb").value, - reader: document.querySelector("#reader").value, - instance: document.querySelector("#instance").value - }); -} -function restoreOptions() { - function setCurrentChoice(result) { - document.querySelector("#rb").value = result.rb || ""; - document.querySelector("#reader").value = result.reader|| ""; - document.querySelector("#instance").value = result.instance || ""; - } - function onError(error) { - console.log(`Error: ${error}`); - } - let getting = browser.storage.sync.get(["rb", "instance", "reader"]); - getting.then(setCurrentChoice, onError); -} -document.addEventListener("DOMContentLoaded", restoreOptions); -document.querySelector("form").addEventListener("submit", saveOptions); - |