From 26150eda6eb2024c27bf24d3c6ea0414ae932dd2 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 21 Dec 2014 13:32:34 +0100 Subject: [PATCH] Remove highlight when we go back to first move. --- www/js/book.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/js/book.js b/www/js/book.js index c6290f1..ebccd1e 100644 --- a/www/js/book.js +++ b/www/js/book.js @@ -48,11 +48,11 @@ var update = function() { board.position(current_display_fen()); } + $("#board").find('.square-55d63').removeClass('nonuglyhighlight'); if (move_override > 0) { var last_move = history[move_override - 1]; var highlight_from = last_move.from; var highlight_to = last_move.to; - $("#board").find('.square-55d63').removeClass('nonuglyhighlight'); $("#board").find('.square-' + highlight_from).addClass('nonuglyhighlight'); $("#board").find('.square-' + highlight_to).addClass('nonuglyhighlight'); } -- 2.39.2