]> git.sesse.net Git - remoteglot/commitdiff
Merge commit '83d2eb4'
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 26 Dec 2017 18:34:06 +0000 (19:34 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 26 Dec 2017 18:34:06 +0000 (19:34 +0100)
remoteglot.pl
www/js/remoteglot.js

index 699968f3afdccb6ec45a5cf6c73f670aa3c9905f..5d907d89f7aba97b35ff5849d9627338733e3a6a 100755 (executable)
@@ -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;
        }
 
index 836b4ba5529c407b1875e69865860b3c4df14991..34e1863624ffdc7afd34a7913e54acd35bbc6028 100644 (file)
@@ -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.