diff options
author | hackademix | 2019-05-28 23:21:43 +0200 |
---|---|---|
committer | hackademix | 2019-05-28 23:32:19 +0200 |
commit | fc72add8a9dc6d25d4f0e8afce5fc1124f7e9312 (patch) | |
tree | c1e7d73e90c9dd268deefb29bbdf2e6d8571c363 | |
parent | b89b161d9b424257486c766624df94d3e8c142c2 (diff) | |
download | noscript-fc72add8a9dc6d25d4f0e8afce5fc1124f7e9312.tar.gz noscript-fc72add8a9dc6d25d4f0e8afce5fc1124f7e9312.tar.xz noscript-fc72add8a9dc6d25d4f0e8afce5fc1124f7e9312.zip |
Fixed [Import] button on Android (issue #76).
-rw-r--r-- | src/ui/options.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ui/options.js b/src/ui/options.js index 999b130..4588330 100644 --- a/src/ui/options.js +++ b/src/ui/options.js @@ -39,14 +39,13 @@ opt("overrideTorBrowserPolicy"); { - let button = document.querySelector("#btn-reset"); - button.onclick = async () => { + document.querySelector("#btn-reset").addEventListener("click", async () => { if (confirm(_("reset_warning"))) { policy = new Policy(); await UI.updateSettings({policy, local: null, sync: null, xssUserChoices: {}}); window.location.reload(); } - } + }); let fileInput = document.querySelector("#file-import"); fileInput.onchange = () => { @@ -62,8 +61,8 @@ fr.readAsText(fileInput.files[0]); } - button = document.querySelector("#btn-import"); - button.onclick = () => fileInput.click(); + document.querySelector("#btn-import").addEventListener("click", + () => fileInput.click()); document.querySelector("#btn-export").addEventListener("click", async e => { let button = e.target; |