From 2226693739ba558cef96e6738e48ed1d16ab97f9 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Sun, 27 Aug 2017 21:47:25 +0000 Subject: [PATCH] Remove force focus --- webapp/titanembeds/static/js/embed.js | 28 +--------------------- webapp/titanembeds/templates/embed.html.j2 | 7 ------ 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index df0604b..0b6934c 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -14,7 +14,6 @@ const theme_options = ["DiscordDark", "BetterTitan"]; // All the avaliable theming names 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 logintimer; // timer to keep track of user inactivity after hitting login var last_message_id; // last message tracked @@ -139,16 +138,6 @@ } ); $('#loginmodal').modal('open'); - - $("#focusmodal").modal({ - dismissible: true, - opacity: .5, - inDuration: 400, - outDuration: 400, - startingTop: "4%", - endingTop: "10%", - }); - $("#focusmodal").modal("open"); $("#userembedmodal").modal({ dismissible: true, opacity: .5, @@ -237,19 +226,7 @@ } }); - if (getParameterByName("forcefocus") == "1") { - if (document.hasFocus()) { - primeEmbed(); - } - - $(window).focus(function() { - if (!has_already_been_focused) { - primeEmbed(); - } - }); - } else { - primeEmbed(); - } + primeEmbed(); setInterval(send_socket_heartbeat, 5000); }); @@ -300,9 +277,6 @@ } function primeEmbed() { - $("#focusmodal").modal("close"); - has_already_been_focused = true; - lock_login_fields(); var guild = query_guild(); diff --git a/webapp/titanembeds/templates/embed.html.j2 b/webapp/titanembeds/templates/embed.html.j2 index ef3ff07..0b1b50c 100644 --- a/webapp/titanembeds/templates/embed.html.j2 +++ b/webapp/titanembeds/templates/embed.html.j2 @@ -115,13 +115,6 @@ - -