From 5736a183e629bedf79f56962a57bf90dd493d967 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 22 Mar 2016 18:13:14 +0100 Subject: [PATCH 1/1] Include the score when showing other games. --- remoteglot.pl | 1 + www/js/remoteglot.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/remoteglot.pl b/remoteglot.pl index b75d85e..c8beaa4 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -935,6 +935,7 @@ sub output_json { name => "$white–$black", url => $ref->{'url'}, hashurl => $ref->{'hash_url'}, + score => $other_game_json->{'score'} }; }; if ($@) { diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index bff8e9c..b599ec8 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -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); } } -- 2.39.2