diff options
author | crupest <crupest@outlook.com> | 2020-10-21 17:14:56 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-10-21 17:14:56 +0800 |
commit | a95c1bb90af94c0a3e9dff488a40f8dc709c3585 (patch) | |
tree | f0182c22745471b70657eb3da295a91823c5e188 /settings/settings.js | |
parent | d7d09fc08a85fb8af4ef3bd3788961a01a26c515 (diff) | |
download | ProxyChanger-a95c1bb90af94c0a3e9dff488a40f8dc709c3585.tar.gz ProxyChanger-a95c1bb90af94c0a3e9dff488a40f8dc709c3585.tar.bz2 ProxyChanger-a95c1bb90af94c0a3e9dff488a40f8dc709c3585.zip |
Allow to set proxy url.
Diffstat (limited to 'settings/settings.js')
-rw-r--r-- | settings/settings.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/settings/settings.js b/settings/settings.js new file mode 100644 index 0000000..ec10c0c --- /dev/null +++ b/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);
+ });
+ });
+});
|