]> git.sesse.net Git - remoteglot/commitdiff
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 b75d85e1961621c1fb5334242c1ac64ca052bc4e..c8beaa463d5c58f3ae21f7b884c44257cb4d8d83 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 bff8e9cd75aac0691bd9c95acbefbc36977a23d6..b599ec8f2c50284b16f57b62bc389633920af6b4 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);
        }
 }