mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-13 21:32:23 +00:00
Fix open status
This commit is contained in:
@@ -6,8 +6,6 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
if ($('span#hackspace-status').length) {
|
if ($('span#hackspace-status').length) {
|
||||||
$.getJSON("https://api.leighhack.org/space.json", function (data) {
|
$.getJSON("https://api.leighhack.org/space.json", function (data) {
|
||||||
var date = new Date(data.state.lastchange * 1000);
|
|
||||||
|
|
||||||
if (data.state.open) {
|
if (data.state.open) {
|
||||||
message = '<b>Open<b>'
|
message = '<b>Open<b>'
|
||||||
if ('message' in data.state) {
|
if ('message' in data.state) {
|
||||||
@@ -16,7 +14,7 @@ $(document).ready(function () {
|
|||||||
$('span#hackspace-status').html(message);
|
$('span#hackspace-status').html(message);
|
||||||
$('div#hackspace-open').addClass('is-success');
|
$('div#hackspace-open').addClass('is-success');
|
||||||
} else {
|
} else {
|
||||||
$('span#hackspace_status').html('<b>Closed</b>');
|
$('span#hackspace-status').html('<b>Closed</b>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user