From fc72add8a9dc6d25d4f0e8afce5fc1124f7e9312 Mon Sep 17 00:00:00 2001 From: hackademix Date: Tue, 28 May 2019 23:21:43 +0200 Subject: Fixed [Import] button on Android (issue #76). --- src/ui/options.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') 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; -- cgit v1.2.3