refresh captcha if it is wrong

This commit is contained in:
biglyderv 2024-11-01 17:53:00 -04:00
parent 8f19c59ebb
commit c029d47157
2 changed files with 3 additions and 1 deletions

View file

@ -16,6 +16,8 @@ async function formClick(ev) {
let json = await fetched.json();
target.querySelector('.captcha').src += '&a=b';
target.querySelector('.form-message').textContent = json.message;
if (json.redirect) {

View file

@ -5,7 +5,7 @@
<div class='form-message'></div>
<% if (!noCaptcha) { %>
<span class='form-key'>
<img class='captcha' src='/client/captcha'>
<img class='captcha' src='/client/captcha?a'>
</span>
<input class='form-input' type='text' name='challenger' value='Type the captcha'>
<% } %>