using spaceAPI v0.13
parent
80760e3852
commit
6de460dcfc
|
@ -213,14 +213,14 @@ function l2status() {
|
||||||
|
|
||||||
var request = $.ajax({
|
var request = $.ajax({
|
||||||
type: 'get',
|
type: 'get',
|
||||||
url: 'https://www.hackerspace.lu/od/',
|
url: 'https://spaceapi.syn2cat.lu/status/json',
|
||||||
complete: function( response ) {
|
complete: function( response ) {
|
||||||
|
|
||||||
var status = JSON.parse( response.responseText );
|
var status = JSON.parse( response.responseText );
|
||||||
|
|
||||||
$('.status').removeClass('open').removeClass('closed');
|
$('.status').removeClass('open').removeClass('closed');
|
||||||
|
|
||||||
if ( status.open ) {
|
if ( status.state.open ) {
|
||||||
$('.status').addClass('open').text('Open');
|
$('.status').addClass('open').text('Open');
|
||||||
} else {
|
} else {
|
||||||
$('.status').addClass('closed').text('Closed');
|
$('.status').addClass('closed').text('Closed');
|
||||||
|
|
Loading…
Reference in New Issue