main.js: remove captcha load recoup

This commit is contained in:
Zankaria 2024-10-19 19:22:39 +02:00
parent 0cb602fd95
commit 14d48402b4

View file

@ -283,18 +283,6 @@ function onCaptchaLoadHcaptcha() {
onCaptchaLoad(renderer);
}
}
function initCaptchaImpl() {
/*
* hcaptcha is set but the captcha_renderer is null? hcaptcha loaded before main.js could set up the callbacks.
* Init now.
*/
if (hcaptcha && captcha_renderer === null) {
if (active_page === 'index' || active_page === 'catalog' || active_page === 'thread') {
onCaptchaLoadHcaptcha();
}
}
}
{% endif %} // End if hcaptcha
{% if config.turnstile %} // If turnstile
@ -329,20 +317,6 @@ function onCaptchaLoadTurnstile(action) {
onCaptchaLoad(renderer);
}
}
function initCaptchaImpl() {
/*
* Turnstile is set but the captcha_renderer is null? Turnstile loaded before main.js could set up the callbacks.
* Init now.
*/
if (turnstile && captcha_renderer === null) {
if (active_page === 'index' || active_page === 'catalog') {
onCaptchaLoadTurnstile('post-thread');
} else if (active_page === 'thread') {
onCaptchaLoadTurnstile('post-reply');
}
}
}
{% endif %} // End if turnstile
function onCaptchaLoad(renderer) {
@ -369,7 +343,6 @@ function initCaptcha() {
let captcha_hook = document.getElementById('captcha');
if (captcha_hook) {
captcha_hook.style = "";
initCaptchaImpl();
}
}
}