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 @@ -4483,6 +4483,11 @@ function updateLeaderboardPane(r){
44834483 var hunters = r . chaser_count ;
44844484 var top = r . top_chasers ;
44854485
4486+ // create a sorted list
4487+ top = Object . keys ( top ) . map ( function ( key ) { return [ key , top [ key ] ] } ) ;
4488+ top . sort ( function ( a , b ) {
4489+ return a [ 1 ] < b [ 1 ]
4490+ } ) ;
44864491
44874492 html += "<div><b>Total sondes recovered: " + recovered + "/" + total + "</b></div>" ;
44884493 html += "<div><b>Total hunters: " + hunters + "</b></div><br>" ;
@@ -4491,7 +4496,7 @@ function updateLeaderboardPane(r){
44914496 var i = 1 ;
44924497 for ( let chaser in top ) {
44934498 if ( top . hasOwnProperty ( chaser ) ) {
4494- html += "<div><b>" + parseInt ( i ) + ". </b>" + chaser + " - " + top [ chaser ] + "</div>" ;
4499+ html += "<div><b>" + parseInt ( i ) + ". </b>" + top [ chaser ] [ 0 ] + " - " + top [ chaser ] [ 1 ] + "</div>" ;
44954500 i += 1 ;
44964501 }
44974502 }
You can’t perform that action at this time.
0 commit comments