File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4504,6 +4504,11 @@ function updateLeaderboardPane(r){
45044504 var hunters = r . chaser_count ;
45054505 var top = r . top_chasers ;
45064506
4507+ // create a sorted list
4508+ top = Object . keys ( top ) . map ( function ( key ) { return [ key , top [ key ] ] } ) ;
4509+ top . sort ( function ( a , b ) {
4510+ return a [ 1 ] < b [ 1 ]
4511+ } ) ;
45074512
45084513 html += "<div><b>Total sondes recovered: " + recovered + "/" + total + "</b></div>" ;
45094514 html += "<div><b>Total hunters: " + hunters + "</b></div><br>" ;
@@ -4512,7 +4517,7 @@ function updateLeaderboardPane(r){
45124517 var i = 1 ;
45134518 for ( let chaser in top ) {
45144519 if ( top . hasOwnProperty ( chaser ) ) {
4515- html += "<div><b>" + parseInt ( i ) + ". </b>" + chaser + " - " + top [ chaser ] + "</div>" ;
4520+ html += "<div><b>" + parseInt ( i ) + ". </b>" + top [ chaser ] [ 0 ] + " - " + top [ chaser ] [ 1 ] + "</div>" ;
45164521 i += 1 ;
45174522 }
45184523 }
You can’t perform that action at this time.
0 commit comments