ONLINE 1
QUEUE 0
const queueVal = document.getElementById('queue-val'); const logoDot = document.getElementById('logo-dot'); const total = data.total || 0; const pos = data.position || 0; if (pos > 0) { monitor.classList.add('is-busy'); queueVal.innerText = `${pos}/${total}`; logoDot.style.backgroundColor = '#3b82f6'; } else { monitor.classList.remove('is-busy'); queueVal.innerText = total > 0 ? total : '0'; logoDot.style.backgroundColor = '#000'; } } catch (e) { } } const host = window.location.host; if (host) { const protocol = location.protocol === 'https:' ? 'wss' : 'ws'; const ws = new WebSocket(`${protocol}://${host}/ws/stats`); ws.onmessage = (e) => { const d = JSON.parse(e.data); if (d.online_count) { document.getElementById('online-val').innerText = d.online_count; } }; setInterval(syncStatus, 2000); }