Server administrators may disable captchas for guest users

This commit is contained in:
Jeremy Zhang
2017-11-04 02:58:26 +00:00
parent 71209d2824
commit bba4950ddc
12 changed files with 78 additions and 6 deletions

View File

@ -14,6 +14,7 @@
/* global grecaptcha */
/* global hljs */
/* global linkify */
/* global unauth_captcha_enabled */
(function () {
const theme_options = ["DiscordDark", "BetterTitan"]; // All the avaliable theming names
@ -1084,7 +1085,11 @@
}
if($(this).val().length >= 2 && $(this).val().length <= 32) {
$("#custom_username_field").blur();
$('#recaptchamodal').modal('open');
if (unauth_captcha_enabled) {
$('#recaptchamodal').modal('open');
} else {
submit_unauthenticated_captcha();
}
}
}
});