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 {