From 14d48402b47c2548c43a5c170937a2097413b17a Mon Sep 17 00:00:00 2001 From: Zankaria Date: Sat, 19 Oct 2024 19:22:39 +0200 Subject: [PATCH] main.js: remove captcha load recoup --- templates/main.js | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/templates/main.js b/templates/main.js index 68a303ef..26505f7e 100755 --- a/templates/main.js +++ b/templates/main.js @@ -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(); } } }