forked from leftypol/leftypol
main.js: do not initialize captcha if not required by the mode
This commit is contained in:
parent
6df32997bf
commit
aa18595adf
1 changed files with 6 additions and 2 deletions
|
@ -251,7 +251,9 @@ var postCaptchaId = null;
|
|||
|
||||
{% if config.captcha.mode == 'hcaptcha' %} // If hcaptcha
|
||||
function onCaptchaLoadHcaptcha() {
|
||||
if (captcha_renderer === null && (active_page === 'index' || active_page === 'catalog' || active_page === 'thread')) {
|
||||
if ((captchaMode === 'static' || (captchaMode === 'dynamic' && isDynamicCaptchaEnabled()))
|
||||
&& captcha_renderer === null
|
||||
&& (active_page === 'index' || active_page === 'catalog' || active_page === 'thread')) {
|
||||
let renderer = {
|
||||
/**
|
||||
* @returns {object} Opaque widget id.
|
||||
|
@ -296,7 +298,9 @@ 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 && (active_page === 'index' || active_page === 'catalog' || active_page === 'thread')) {
|
||||
if ((captchaMode === 'static' || (captchaMode === 'dynamic' && isDynamicCaptchaEnabled()))
|
||||
&& captcha_renderer === null
|
||||
&& (active_page === 'index' || active_page === 'catalog' || active_page === 'thread')) {
|
||||
let renderer = {
|
||||
/**
|
||||
* @returns {object} Opaque widget id.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue