From db65b8ac41ec418291bfa6ce0b00a099abf00783 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 10:57:11 +0000 Subject: [PATCH] Admin page: leave archived games out of the game menu and Hours by game Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Cw2rM83QU3zxfQu1UxFEBM --- e63334287a3deaa3/d06440218d1813a3/index.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/e63334287a3deaa3/d06440218d1813a3/index.html b/e63334287a3deaa3/d06440218d1813a3/index.html index accbc5d0..b539bab7 100644 --- a/e63334287a3deaa3/d06440218d1813a3/index.html +++ b/e63334287a3deaa3/d06440218d1813a3/index.html @@ -560,8 +560,9 @@

Can't read feedback

function fillGames(){ var sel=$('sGame'),cur=sel.value||'all'; sel.textContent='';opt(sel,'all','All games'); - if(LB)LB.GAMES.forEach(function(g){opt(sel,g.d,g.n)}); - sel.value=cur==='all'||(LB&&LB.BY[cur])?cur:'all'; + // Archived games (gone: 1 in leaderboard.js) are left out of the menu and the Hours by game list; their time still counts in the totals. + if(LB)LB.GAMES.forEach(function(g){if(!g.gone)opt(sel,g.d,g.n)}); + sel.value=cur==='all'||(LB&&LB.BY[cur]&&!LB.BY[cur].gone)?cur:'all'; } // The day keys in a range ('1', '7', '30'), or null for all time. function daysIn(range){if(range==='all')return null;var n=Math.max(1,Math.min(DAYS,+range||1)),set={};for(var i=0;iCan't read feedback Object.keys(per).forEach(function(d){gs[d]=(gs[d]||0)+per[d];gp[d]=(gp[d]||0)+1}); total+=v;if(p.ga)google++; }); - var games=LB.GAMES.filter(function(g){return gs[g.d]>0}).map(function(g){return {d:g.d,n:g.n,s:gs[g.d],people:gp[g.d]}}).sort(function(a,b){return b.s-a.s||b.people-a.people}); + var games=LB.GAMES.filter(function(g){return !g.gone&&gs[g.d]>0}).map(function(g){return {d:g.d,n:g.n,s:gs[g.d],people:gp[g.d]}}).sort(function(a,b){return b.s-a.s||b.people-a.people}); return {range:range,gv:gv,gOnly:gOnly,days:days,list:list,idle:idle,games:games,total:total,google:google}; } var last=null;