mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-06-16 19:35:24 +02:00
Server administrators may disable captchas for guest users
This commit is contained in:
@ -76,6 +76,15 @@ $("#guest_icon").keyup(function(event){
|
||||
}
|
||||
});
|
||||
|
||||
$('#unauth_captcha').change(function() {
|
||||
var pathname = window.location.pathname;
|
||||
var checked = $(this).is(':checked')
|
||||
var payload = {"unauth_captcha": checked}
|
||||
$.post(pathname, payload, function(data) {
|
||||
Materialize.toast('Updated Guest User Captcha setting!', 2000)
|
||||
});
|
||||
});
|
||||
|
||||
function initiate_ban(guild_id, user_id) {
|
||||
var reason = prompt("Please enter your reason for ban");
|
||||
var payload = {
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user