aboutsummaryrefslogtreecommitdiff
path: root/store/works/ProxyChanger/settings/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'store/works/ProxyChanger/settings/settings.js')
-rw-r--r--store/works/ProxyChanger/settings/settings.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/store/works/ProxyChanger/settings/settings.js b/store/works/ProxyChanger/settings/settings.js
new file mode 100644
index 0000000..ec10c0c
--- /dev/null
+++ b/store/works/ProxyChanger/settings/settings.js
@@ -0,0 +1,14 @@
+browser.storage.local.get("proxyUrl").then(({ proxyUrl }) => {
+ console.log("Saved proxy url is", proxyUrl);
+ document.getElementById("proxy_url").value = proxyUrl;
+ document.getElementById("proxy_url").addEventListener("input", (e) => {
+ const { value } = e.currentTarget;
+ browser.storage.local
+ .set({
+ proxyUrl: value,
+ })
+ .then(() => {
+ console.log("New proxy url saved!", value);
+ });
+ });
+});