aboutsummaryrefslogtreecommitdiff
path: root/p/scripts/extra.js
diff options
context:
space:
mode:
authorGravatar maTh <math-home@web.de> 2021-11-14 23:24:47 +0100
committerGravatar GitHub <noreply@github.com> 2021-11-14 23:24:47 +0100
commitf12637d2b267be942fe03030f1e8946e2b480185 (patch)
tree05179d1c730ec618f00a8ef7f0bfa6b22926b382 /p/scripts/extra.js
parente61906b5e78e8dba6fef59ae00f6f2e100ab2ed7 (diff)
Fix js errors (#3980)
* fixed missed popup * fix missed document.getElementById('loginButton') * make fix-all Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'p/scripts/extra.js')
-rw-r--r--p/scripts/extra.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/p/scripts/extra.js b/p/scripts/extra.js
index e487ab8c9..ec98b41bb 100644
--- a/p/scripts/extra.js
+++ b/p/scripts/extra.js
@@ -51,10 +51,14 @@ function init_crypto_form() {
forgetOpenCategories();
const submit_button = document.getElementById('loginButton');
- submit_button.disabled = false;
+ if (submit_button) {
+ submit_button.disabled = false;
+ }
crypto_form.onsubmit = function (e) {
- submit_button.disabled = true;
+ if (submit_button) {
+ submit_button.disabled = true;
+ }
let success = false;
const req = new XMLHttpRequest();
@@ -86,7 +90,9 @@ function init_crypto_form() {
req.onerror();
}
- submit_button.disabled = false;
+ if (submit_button) {
+ submit_button.disabled = false;
+ }
return success;
};
}