Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
(6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
<noinclude> | <noinclude> | ||
__NOTOC__ | __NOTOC__ | ||
{{#widget:ClubStatus}} | {{#widget:ClubStatus}} | ||
</noinclude><includeonly><script> | |||
</noinclude> | |||
<includeonly> | |||
<script> | |||
(() => { | (() => { | ||
const OPENED_CLASS = ' | const OPENED_CLASS = 'widget-clubstatus__type--opened'; | ||
const CLOSED_CLASS = ' | const CLOSED_CLASS = 'widget-clubstatus__type--closed'; | ||
const clubStatusMarker = document.querySelector(' | const clubStatusMarker = document.querySelector('#widget-clubstatus'); | ||
function setClubStatus(isOpen, lastChange) { | function setClubStatus(isOpen, lastChange) { | ||
Zeile 32: | Zeile 26: | ||
function updateClubStatus() { | function updateClubStatus() { | ||
fetch('api/entropia-club-status-json-api.php') | fetch('/api/entropia-club-status-json-api.php') | ||
.then(response => response.json()) | .then(response => response.json()) | ||
.then(data => setClubStatus(data["isOpen"], data["lastChange"])); | .then(data => setClubStatus(data["isOpen"], data["lastChange"])); | ||
Zeile 41: | Zeile 35: | ||
updateClubStatus(); | updateClubStatus(); | ||
})(); | })(); | ||
</script> | </script></includeonly> | ||
</includeonly> |
Aktuelle Version vom 14. März 2024, 12:10 Uhr