From: Marius Gavrilescu Date: Tue, 28 Apr 2015 16:28:58 +0000 (+0300) Subject: Fix 95-login.js X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=8e3f7d1e659c971fe718b6dccd0b904ed2c0d35a;p=gruntmaster-page.git Fix 95-login.js --- diff --git a/js/95-login.js b/js/95-login.js index bf16d31..d08150a 100644 --- a/js/95-login.js +++ b/js/95-login.js @@ -7,9 +7,9 @@ $(function(){ var xhr = new XMLHttpRequest(); xhr.open('GET', '/login'); xhr.onload = () => { - if(this.status != 200) + if(xhr.status != 200) return; - var username = this.responseText; + var username = xhr.responseText; sessionStorage.setItem('login_username', username); start_tracking(username); login.innerHTML = 'Probably logged in as ' + username;