<h1>Live resultater</h1>
<br>
<table id ="table">
<tr>
<th>Some shit</th>
</tr>
</table>
<script>
hash = 0;
async function doTheThang()
{
response = await fetch("sync.php?hash=" + hash);
if (response.status === 204)
return;
}
json = await response.json();
hash = json.hash;
data = json.data;
document.getElementById("table").innerHTML = json.data;
setInterval(function() { doTheThang() }, 1000)
doTheThang();
</script>