diff --git a/app/static/script.js b/app/static/script.js index 75d6094..8bbb3c9 100644 --- a/app/static/script.js +++ b/app/static/script.js @@ -20,7 +20,14 @@ function updateScoreboard(data) { const grid = document.getElementById(gridId); const hasGames = games && games.length > 0; section.classList.toggle('hidden', !hasGames); + + // Snapshot current clock state before blowing away the DOM + const clockSnapshot = snapshotClocks(grid); + grid.innerHTML = hasGames ? games.map(render).join('') : ''; + + // Restore smooth local anchors unless we're in the final 60s + if (hasGames) restoreClocks(grid, clockSnapshot); } updateGauges(); @@ -56,7 +63,7 @@ function renderLiveGame(game) { ` : ''; return ` -