diff options
author | hackademix | 2019-12-30 15:37:48 +0100 |
---|---|---|
committer | hackademix | 2019-12-30 15:37:48 +0100 |
commit | ab865d14c2a0cb6402753b4c7fb5ced80d53747e (patch) | |
tree | 80ce5316f3f68c8f265a2200cffcf95546d23436 | |
parent | 6166f8f280c3de4299b2970c0b290bb64092204c (diff) | |
download | noscript-ab865d14c2a0cb6402753b4c7fb5ced80d53747e.tar.gz noscript-ab865d14c2a0cb6402753b4c7fb5ced80d53747e.tar.xz noscript-ab865d14c2a0cb6402753b4c7fb5ced80d53747e.zip |
Fixed settings export button broken on Vivaldi (issue #124).
-rw-r--r-- | src/ui/options.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ui/options.js b/src/ui/options.js index 75f1280..1342af0 100644 --- a/src/ui/options.js +++ b/src/ui/options.js @@ -71,7 +71,11 @@ let button = e.target; button.disabled = true; let settings = await UI.exportSettings(); - let f = document.createElement("iframe"); + let id = "noscriptExportFrame"; + let f = document.getElementById(id); + if (f) f.remove(); + f = document.createElement("iframe"); + f.id = id; f.srcdoc = `<a download="noscript_data.txt" target="_blank">NoScript Export</a>`; f.style.position = "fixed"; f.style.top = "-999px"; @@ -84,7 +88,6 @@ })); a.click(); setTimeout(() => { - f.remove(); button.disabled = false; }, 1000); |