kontakt: [email protected]
Widżet:MTA: Różnice pomiędzy wersjami
Przejdź do nawigacji
Przejdź do wyszukiwania
chuj do dupy |
Nie podano opisu zmian |
||
Linia 1: | Linia 1: | ||
<includeonly><script type="text/javascript"> | <includeonly><script type="text/javascript"> | ||
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 => { | 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 $container_id}--> | ||
let onlineCountString = json.playersOnline.length + "/" + json.maximumPlayers; | let onlineCountString = json.playersOnline.length + "/" + json.maximumPlayers; | ||
let container = document.getElementById("<!--{$container_id|escape:'javascript'}-->"); | let container = document.getElementById("<!--{$container_id|escape:'javascript'}-->"); | ||
container.innerText = onlineCountString; | container.innerText = onlineCountString;<!--{/if}--> | ||
}); | }); | ||
</script></includeonly> | </script></includeonly> |