diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index 31d2ffa..8169a8f 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -109,6 +109,18 @@ } $('select').material_select(); + + $("#loginmodal").modal({ + dismissible: visitors_enabled, // Modal can be dismissed by clicking outside of the modal + opacity: .5, // Opacity of modal background + inDuration: 300, // Transition in duration + outDuration: 200, // Transition out duration + startingTop: '4%', // Starting top style attribute + endingTop: '10%', // Ending top style attribute + } + ); + $('#loginmodal').modal('open'); + $("#focusmodal").modal({ dismissible: true, opacity: .5, @@ -153,6 +165,11 @@ $('select').material_select(); } + var dembed = discord_embed(); + dembed.done(function (data) { + $("#modal_invite_btn").attr("href", data.instant_invite); + }); + if (getParameterByName("forcefocus") == "1") { if (document.hasFocus()) { primeEmbed(); @@ -209,23 +226,6 @@ $("#focusmodal").modal("close"); has_already_been_focused = true; - var dembed = discord_embed(); - dembed.done(function (data) { - $("#modal_invite_btn").attr("href", data.instant_invite); - }); - - var login_modal_dismissible = visitors_enabled; - - $("#loginmodal").modal({ - dismissible: login_modal_dismissible, // Modal can be dismissed by clicking outside of the modal - opacity: .5, // Opacity of modal background - inDuration: 300, // Transition in duration - outDuration: 200, // Transition out duration - startingTop: '4%', // Starting top style attribute - endingTop: '10%', // Ending top style attribute - } - ); - $('#loginmodal').modal('open'); lock_login_fields(); var guild = query_guild();