Remove force focus

This commit is contained in:
Jeremy Zhang 2017-08-27 21:47:25 +00:00
parent 907bb510eb
commit 2226693739
2 changed files with 1 additions and 34 deletions

View File

@ -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();

View File

@ -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 %}