Fixed an error with successful verification after updating the captcha.

This commit is contained in:
Leonid Nikitin 2023-11-26 14:58:07 +06:00
parent c57a81d76b
commit 04eacf66cd
Signed by: kor-elf
GPG Key ID: 604A019EB118CAC4

View File

@ -48,7 +48,7 @@
}); });
windowCaptcha.querySelector('button.window-captcha__reload').addEventListener('click', function () { windowCaptcha.querySelector('button.window-captcha__reload').addEventListener('click', function () {
actionGetCaptcha(windowCaptcha, domain, token); actionGetCaptcha(windowCaptcha, domain, token, shadow);
}); });
return windowCaptcha; return windowCaptcha;
@ -175,7 +175,6 @@
setError('Произошла ошибка!', button); setError('Произошла ошибка!', button);
return return
} }
shadow.querySelector('button.button-open-window-captcha').remove(); shadow.querySelector('button.button-open-window-captcha').remove();
let captchaVerified = document.createElement('div'); let captchaVerified = document.createElement('div');
captchaVerified.innerHTML = `<span class="captcha-verified">Ура!!! Проверку прошли!</span><input type="hidden" name="captcha-verified" value="${ data.captcha_key }">`; captchaVerified.innerHTML = `<span class="captcha-verified">Ура!!! Проверку прошли!</span><input type="hidden" name="captcha-verified" value="${ data.captcha_key }">`;