X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=b72f4c426119082512ba43af50bec53fe68a3019;hp=37f5c7bd1b61a034e56e9471fc4cd74f074be7ce;hb=f71f5c94d093acda1b39d23cf7a71a21c6a3122b;hpb=9fc4030d9b55674b73c341c815292055fcb6f05c diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 37f5c7b..b72f4c4 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -1213,6 +1213,24 @@ var update_board = function() { $("#score").text(format_long_score(data['score'])); } + // Low depth. + var lowdepth = ''; + if (data['lowdepth']) { + lowdepth = 'Quick look: '; + var lds = []; + Object.keys(data['lowdepth']).forEach(function(depth) { + lds.push([parseInt(depth), format_short_score(data['lowdepth'][depth])]); + }); + lds.sort(function(a, b) { return a[0] - b[0]; }); + for (var i = 0; i < lds.length; ++i) { + lowdepth += 'd' + lds[i][0] + ': ' + lds[i][1]; + if (i != lds.length - 1) { + lowdepth += ', '; + } + } + } + $("#lowdepth").html(lowdepth); + // The search stats. if (data['searchstats']) { $("#searchstats").html(data['searchstats']);