25 lines
663 B
HTML
25 lines
663 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Wywoływany numer</title>
|
|
<style>body{font-family:Helvetica,Arial;margin:30px;text-align:center} .num{font-size:120px;font-weight:700}</style>
|
|
<script>
|
|
async function fetchCurrent(){
|
|
try{
|
|
const r = await fetch('/current');
|
|
const j = await r.json();
|
|
document.getElementById('num').textContent = j.current || '-';
|
|
}catch(e){}
|
|
}
|
|
// poll co 2s
|
|
setInterval(fetchCurrent, 2000);
|
|
window.addEventListener('load', fetchCurrent);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1>Proszę podejść do okienka</h1>
|
|
<div class="num" id="num">-</div>
|
|
</body>
|
|
</html>
|