kontakt: [email protected]
Widżet:MTA: Różnice pomiędzy wersjami
Przejdź do nawigacji
Przejdź do wyszukiwania
mNie podano opisu zmian |
Nie podano opisu zmian |
||
Linia 2: | Linia 2: | ||
let timer; | let timer; | ||
let fetchData = () => { | let fetchData = () => { | ||
fetch("https://api.cors.lol/?url=http://<!--{$server_url|default:'158.180.44.86:22005'|escape:'javascript'}-->/api/online").then(resp => resp.json()).then(json => {<!--{if $online_count_container_id}--> | fetch("https://api.cors.lol/?url=http://<!--{$server_url|default:'158.180.44.86:22005'|escape:'javascript'}-->/api/v1/online").then(resp => resp.json()).then(json => {<!--{if $online_count_container_id}--> | ||
let onlineCountString = json.playersOnline.length + "/" + json.maximumPlayers; | let onlineCountString = json.playersOnline.length + "/" + json.maximumPlayers; | ||
let container = document.getElementById("<!--{$online_count_container_id|escape:'javascript'}-->"); | let container = document.getElementById("<!--{$online_count_container_id|escape:'javascript'}-->"); |