From ae253234787f2adbf4fd128d046f569b9aebca22 Mon Sep 17 00:00:00 2001 From: "Eric Meehan -X (ermeehan - ACTALENT SERVICES LLC at Cisco)" Date: Sun, 18 Oct 2026 18:55:25 -0400 Subject: [PATCH] Globals --- server.py | 2 ++ static/app.js | 4 ++-- static/index.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index b0c9d34..cb20146 100644 --- a/server.py +++ b/server.py @@ -287,6 +287,8 @@ class Handler(BaseHTTPRequestHandler): "deadline": state["deadline"], "duration_ms": DURATION_MS, "ended": state["ended"], + "total_players": len(state["players"]), + "total_presses": len(state["presses"]), "zones": ZONES, }) if path == "/api/me": diff --git a/static/app.js b/static/app.js index 799d75c..39eee4c 100644 --- a/static/app.js +++ b/static/app.js @@ -145,6 +145,8 @@ async function refreshState() { const first = !game; clockOffset = s.now - (t0 + Date.now()) / 2; game = s; + $("history-global-summary").textContent = + `There have been ${s.total_presses.toLocaleString()} total presses and there are ${s.total_players.toLocaleString()} total players.`; if (first) buildStaticUi(); if (game.ended && !statsLoaded) loadStats(); updateButton(); @@ -181,8 +183,6 @@ async function loadMe() { $("my-name").textContent = me.name; $("my-points").textContent = me.total_points.toLocaleString(); $("my-presses").textContent = me.press_count; - $("history-global-summary").textContent = - `There have been ${me.total_presses.toLocaleString()} total presses and there are ${me.total_players.toLocaleString()} total players.`; subscribed = me.subscribed; updateButton(); fillTable($("my-zones"), ["Zone", "Points each", "Your presses"], zoneRows(me.zone_counts)); diff --git a/static/index.html b/static/index.html index 96c638b..072157b 100644 --- a/static/index.html +++ b/static/index.html @@ -22,6 +22,7 @@
--:--:--.--
+

@@ -63,7 +64,6 @@
Your press history
-