mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Remove force focus
This commit is contained in:
parent
907bb510eb
commit
2226693739
@ -14,7 +14,6 @@
|
|||||||
const theme_options = ["DiscordDark", "BetterTitan"]; // All the avaliable theming names
|
const theme_options = ["DiscordDark", "BetterTitan"]; // All the avaliable theming names
|
||||||
|
|
||||||
var user_def_css; // Saves the user defined css
|
var user_def_css; // Saves the user defined css
|
||||||
var has_already_been_focused = false; // keep track of if the embed has initially been focused.
|
|
||||||
var has_already_been_initially_resized = false; // keep track if the embed initially been resized
|
var has_already_been_initially_resized = false; // keep track if the embed initially been resized
|
||||||
var logintimer; // timer to keep track of user inactivity after hitting login
|
var logintimer; // timer to keep track of user inactivity after hitting login
|
||||||
var last_message_id; // last message tracked
|
var last_message_id; // last message tracked
|
||||||
@ -139,16 +138,6 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
$('#loginmodal').modal('open');
|
$('#loginmodal').modal('open');
|
||||||
|
|
||||||
$("#focusmodal").modal({
|
|
||||||
dismissible: true,
|
|
||||||
opacity: .5,
|
|
||||||
inDuration: 400,
|
|
||||||
outDuration: 400,
|
|
||||||
startingTop: "4%",
|
|
||||||
endingTop: "10%",
|
|
||||||
});
|
|
||||||
$("#focusmodal").modal("open");
|
|
||||||
$("#userembedmodal").modal({
|
$("#userembedmodal").modal({
|
||||||
dismissible: true,
|
dismissible: true,
|
||||||
opacity: .5,
|
opacity: .5,
|
||||||
@ -237,19 +226,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (getParameterByName("forcefocus") == "1") {
|
primeEmbed();
|
||||||
if (document.hasFocus()) {
|
|
||||||
primeEmbed();
|
|
||||||
}
|
|
||||||
|
|
||||||
$(window).focus(function() {
|
|
||||||
if (!has_already_been_focused) {
|
|
||||||
primeEmbed();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
primeEmbed();
|
|
||||||
}
|
|
||||||
|
|
||||||
setInterval(send_socket_heartbeat, 5000);
|
setInterval(send_socket_heartbeat, 5000);
|
||||||
});
|
});
|
||||||
@ -300,9 +277,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function primeEmbed() {
|
function primeEmbed() {
|
||||||
$("#focusmodal").modal("close");
|
|
||||||
has_already_been_focused = true;
|
|
||||||
|
|
||||||
lock_login_fields();
|
lock_login_fields();
|
||||||
|
|
||||||
var guild = query_guild();
|
var guild = query_guild();
|
||||||
|
@ -115,13 +115,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="focusmodal" class="modal">
|
|
||||||
<div class="modal-content">
|
|
||||||
<h4>This embed is currently unfocused.</h4>
|
|
||||||
<p class="flow-text">Please click this part of the page to initialize the embed.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="userembedmodal" class="modal">
|
<div id="userembedmodal" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
{% if unauth_enabled %}
|
{% if unauth_enabled %}
|
||||||
|
Loading…
Reference in New Issue
Block a user