From 501f8dc7c7e46a96c3b719fae0a533e2d671cfae Mon Sep 17 00:00:00 2001 From: Thierry Degeling Date: Sun, 20 Jul 2014 22:52:23 +0200 Subject: [PATCH] Refreshing made faster ;) --- js/level2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/level2.js b/js/level2.js index 73502bc..3311f2a 100644 --- a/js/level2.js +++ b/js/level2.js @@ -192,8 +192,6 @@ function OWMIcon( imageCode ) { function l2status() { - $('.status').removeClass('open').removeClass('closed'); - var request = $.ajax({ type: 'get', url: 'https://www.hackerspace.lu/od/', @@ -201,6 +199,8 @@ function l2status() { var status = JSON.parse( response.responseText ); + $('.status').removeClass('open').removeClass('closed'); + if ( status.open ) { $('.status').addClass('open').text('Open'); } else {