aboutsummaryrefslogtreecommitdiff
path: root/p/scripts/extra.js
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2020-12-22 17:36:50 +0100
committerGravatar GitHub <noreply@github.com> 2020-12-22 17:36:50 +0100
commit48e0464e4bf70a240d6c829bc3e9434ecc04ec42 (patch)
tree28f26a1dc62546440c551b89d28a82b2e610ba35 /p/scripts/extra.js
parent98b82842d58579832f0687127218cd272a7ad636 (diff)
Prevent login before extra.js is loaded (#3275)
Disable submit button until extra.js with its crypto functions is loaded.
Diffstat (limited to 'p/scripts/extra.js')
-rw-r--r--p/scripts/extra.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/p/scripts/extra.js b/p/scripts/extra.js
index d34042e05..4d4f3f171 100644
--- a/p/scripts/extra.js
+++ b/p/scripts/extra.js
@@ -51,8 +51,10 @@ function init_crypto_form() {
forgetOpenCategories();
+ const submit_button = document.querySelector('button[type="submit"]');
+ submit_button.disabled = false;
+
crypto_form.onsubmit = function (e) {
- const submit_button = this.querySelector('button[type="submit"]');
submit_button.disabled = true;
let success = false;