Include the score when showing other games.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 22 Mar 2016 17:13:14 +0000 (18:13 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 22 Mar 2016 17:13:14 +0000 (18:13 +0100)
remoteglot.pl
www/js/remoteglot.js

index b75d85e..c8beaa4 100755 (executable)
@@ -935,6 +935,7 @@ sub output_json {
                                        name => "$white–$black",
                                        url => $ref->{'url'},
                                        hashurl => $ref->{'hash_url'},
+                                       score => $other_game_json->{'score'}
                                };
                        };
                        if ($@) {
index bff8e9c..b599ec8 100644 (file)
@@ -7,7 +7,7 @@
  * @type {Number}
  * @const
  * @private */
-var SCRIPT_VERSION = 2016032000;
+var SCRIPT_VERSION = 2016032200;
 
 /**
  * The current backend URL.
@@ -48,6 +48,7 @@ var displayed_analysis_data = null;
  *      name: string,
  *      url: string,
  *      id: string,
+ *      score: Object
  * }>}
  * @private
  */
@@ -895,6 +896,10 @@ var update_game_list = function(games) {
                        game_a.appendChild(game_name);
                        game_span.appendChild(game_a);
                }
+
+               var score = " (" + format_short_score(game['score']) + ")";
+               game_span.appendChild(document.createTextNode(score));
+
                games_div.appendChild(game_span);
        }
 }