From: Steinar H. Gunderson Date: Tue, 26 Dec 2017 18:34:06 +0000 (+0100) Subject: Merge commit '83d2eb4' X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=93c084f827a5783b20a3b3349463187c6d342810;hp=05513b8ab69d30778131b5d70e84a828dafe21e6 Merge commit '83d2eb4' --- diff --git a/remoteglot.pl b/remoteglot.pl index 699968f..5d907d8 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -346,6 +346,9 @@ sub handle_position { # ignore it. if (defined($pos_calculating) && $pos->fen() eq $pos_calculating->fen()) { $pos_calculating->{'result'} = $pos->{'result'}; + for my $key ('white_clock', 'black_clock', 'white_clock_target', 'black_clock_target') { + $pos_calculating->{$key} //= $pos->{$key}; + } return; } diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 836b4ba..34e1863 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -7,7 +7,7 @@ * @type {Number} * @const * @private */ -var SCRIPT_VERSION = 2016091401; +var SCRIPT_VERSION = 2016113002; /** * The current backend URL. @@ -1418,8 +1418,9 @@ var update_clock = function() { return; } - // If either player has ten minutes or less left, add the second counters. - var show_seconds = (white_clock_ms < 60 * 10 * 1000 || black_clock_ms < 60 * 10 * 1000); + // If either player has twenty minutes or less left, add the second counters. + // This matches what DGT clocks do. + var show_seconds = (white_clock_ms < 60 * 20 * 1000 || black_clock_ms < 60 * 20 * 1000); if (color) { // See when the clock will change next, and update right after that.