mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Auto logs user in with prefilled guest username if no captcha is present
This commit is contained in:
parent
e8ecacb9be
commit
9e53f16eb2
@ -73,7 +73,7 @@ QUERY_PARAMETERS = [
|
||||
{
|
||||
"name": "username",
|
||||
"type": "string",
|
||||
"description": "Prefills the guest username field with the given username.",
|
||||
"description": "Prefills the guest username field with the given username. If the guest captcha is disabled and that the user has not been logged in yet, it automatically logs the user in with the specified username.",
|
||||
"example": "Rainbow%20Dash",
|
||||
},
|
||||
{
|
||||
|
@ -415,6 +415,8 @@
|
||||
unlock_login_fields();
|
||||
if (data.status == 403 && getParameterByName("create_authenticated_user") == "true" && getParameterByName("sametarget") == "true") {
|
||||
wait_for_discord_login();
|
||||
} else if (!unauth_captcha_enabled && $("#custom_username_field").val().trim() !== "") {
|
||||
$("#custom_username_field").trigger(jQuery.Event("keyup", { keyCode: 13 } ));
|
||||
} else if (visitors_enabled) {
|
||||
setVisitorMode(true);
|
||||
var guild2 = query_guild();
|
||||
|
@ -411,7 +411,7 @@
|
||||
const guild_id = "{{ guild_id }}";
|
||||
const bot_client_id = "{{ client_id }}";
|
||||
const visitors_enabled = {% if visitors_enabled %}true{% else %}false{% endif %};
|
||||
const unauth_captcha_enabled = {% if unauth_captcha_enabled %}true{% else %}false{% endif %}
|
||||
const unauth_captcha_enabled = {% if unauth_captcha_enabled %}true{% else %}false{% endif %};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/embed.js') }}"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user