diff --git a/templates/main.js b/templates/main.js index 3e1734ac..68a303ef 100755 --- a/templates/main.js +++ b/templates/main.js @@ -271,7 +271,7 @@ var captcha_renderer = null; {% if config.hcaptcha %} // If hcaptcha function onCaptchaLoadHcaptcha() { - if (captcha_renderer === null) { + if (captcha_renderer === null && (active_page === 'index' || active_page === 'catalog' || active_page === 'thread')) { let renderer = { renderOn: (container) => hcaptcha.render(container, { sitekey: "{{ config.hcaptcha_public }}", @@ -310,7 +310,7 @@ window.onCaptchaLoadTurnstile_post_thread = function() { // Should be called by the captcha API when it's ready. Ugly I know... D: function onCaptchaLoadTurnstile(action) { - if (captcha_renderer === null) { + if (captcha_renderer === null && (active_page === 'index' || active_page === 'catalog' || active_page === 'thread')) { let renderer = { renderOn: function(container) { let widgetId = turnstile.render('#' + container, {