diff options
| author | 2025-05-31 21:43:18 +0200 | |
|---|---|---|
| committer | 2025-05-31 21:43:18 +0200 | |
| commit | 464921108b4a47fc36ba243f56966c04660ce1cb (patch) | |
| tree | 3d7a47791cb0363f4c7d495f63098bc608d3e287 /p/scripts | |
| parent | 80c9623f8fdbbd3ee4eb3df2c1d7e69d12aa464a (diff) | |
Fix user self-deletion (#7626)
* Fix user self-deletion
* Minor code cleanup
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/extra.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/p/scripts/extra.js b/p/scripts/extra.js index cfd1cef4d..e19e1e899 100644 --- a/p/scripts/extra.js +++ b/p/scripts/extra.js @@ -33,7 +33,7 @@ function init_crypto_form() { forgetOpenCategories(); - const submit_button = document.getElementById('loginButton'); + const submit_button = crypto_form.querySelector('[type="submit"]'); if (submit_button) { submit_button.disabled = false; } @@ -46,11 +46,6 @@ function init_crypto_form() { } submit_button.disabled = true; - if (document.getElementById('challenge').value) { - // Already computed - return true; - } - const req = new XMLHttpRequest(); req.open('GET', './?c=javascript&a=nonce&user=' + document.getElementById('username').value, true); @@ -83,6 +78,7 @@ function init_crypto_form() { } else { req.onerror(); } + submit_button.disabled = false; }; req.send(); |
