From 16a95dd40880fdf0dceb8efea0f7518a50d0cebd Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Tue, 13 Aug 2013 12:58:07 -0400 Subject: [PATCH] fixed welcome back message, it wasnt showing up in some cases --- public/src/app.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/src/app.js b/public/src/app.js index c71f650777..6dfb235cd3 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -5,7 +5,8 @@ var socket, (function() { - + var showWelcomeMessage = false; + function loadConfig() { $.ajax({ @@ -285,8 +286,9 @@ var socket, timeout: 5000 }); } - - if(location.href.indexOf('loggedin') !== -1) { + + if(showWelcomeMessage) { + showWelcomeMessage = false; if(document.readyState !== 'complete') { $(document).ready(showAlert); } else { @@ -371,6 +373,8 @@ var socket, }) }); + showWelcomeMessage = location.href.indexOf('loggedin') !== -1; + loadConfig();