@@ -560,8 +560,9 @@ <h2>Can't read feedback</h2>
560560 function fillGames ( ) {
561561 var sel = $ ( 'sGame' ) , cur = sel . value || 'all' ;
562562 sel . textContent = '' ; opt ( sel , 'all' , 'All games' ) ;
563- if ( LB ) LB . GAMES . forEach ( function ( g ) { opt ( sel , g . d , g . n ) } ) ;
564- sel . value = cur === 'all' || ( LB && LB . BY [ cur ] ) ?cur :'all' ;
563+ // 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.
564+ if ( LB ) LB . GAMES . forEach ( function ( g ) { if ( ! g . gone ) opt ( sel , g . d , g . n ) } ) ;
565+ sel . value = cur === 'all' || ( LB && LB . BY [ cur ] && ! LB . BY [ cur ] . gone ) ?cur :'all' ;
565566 }
566567 // The day keys in a range ('1', '7', '30'), or null for all time.
567568 function daysIn ( range ) { if ( range === 'all' ) return null ; var n = Math . max ( 1 , Math . min ( DAYS , + range || 1 ) ) , set = { } ; for ( var i = 0 ; i < n ; i ++ ) set [ dayAgo ( i ) ] = 1 ; return set }
@@ -594,7 +595,7 @@ <h2>Can't read feedback</h2>
594595 Object . keys ( per ) . forEach ( function ( d ) { gs [ d ] = ( gs [ d ] || 0 ) + per [ d ] ; gp [ d ] = ( gp [ d ] || 0 ) + 1 } ) ;
595596 total += v ; if ( p . ga ) google ++ ;
596597 } ) ;
597- 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 } ) ;
598+ 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 } ) ;
598599 return { range :range , gv :gv , gOnly :gOnly , days :days , list :list , idle :idle , games :games , total :total , google :google } ;
599600 }
600601 var last = null ;
0 commit comments