forked from leftypol/leftypol
main.js: do not initialize captchas if there is no hook
This commit is contained in:
parent
111fa78921
commit
3994afd10d
1 changed files with 4 additions and 2 deletions
|
@ -349,9 +349,11 @@ function isDynamicCaptchaEnabled() {
|
|||
function initCaptcha() {
|
||||
if (isDynamicCaptchaEnabled()) {
|
||||
let captcha_hook = document.getElementById('captcha');
|
||||
if (captcha_hook) {
|
||||
captcha_hook.style = "";
|
||||
initCaptchaImpl();
|
||||
}
|
||||
}
|
||||
}
|
||||
{% endif %} // End if dynamic captcha
|
||||
{% else %} // Else if any captcha
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue