]> git.sesse.net Git - remoteglot/blobdiff - www/js/remoteglot.js
Fix highlight removals.
[remoteglot] / www / js / remoteglot.js
index 73f14efb91405aada6adb0200dc509df4ee774e0..624156b0f311dbc7b2d09e8b2d4ccbb616ae8929 100644 (file)
@@ -793,7 +793,7 @@ var print_pv = function(line_num, splicepos, opt_limit, opt_showlast) {
  * Based on the global "highlight_from" and "highlight_to" variables.
  */
 var update_board_highlight = function() {
-       document.getElementById("board").querySelector('.square-55d63').classList.remove('nonuglyhighlight');
+       document.getElementById("board").querySelectorAll('.square-55d63').forEach((square) => square.classList.remove('nonuglyhighlight'));
        if ((current_display_line === null || current_display_line_is_history) &&
            highlight_from !== undefined && highlight_to !== undefined) {
                document.getElementById("board").querySelector('.square-' + highlight_from).classList.add('nonuglyhighlight');
@@ -1994,7 +1994,8 @@ var explore_hash = function(fen) {
        const signal = current_analysis_xhr.signal;
        fetch(backend_hash_url + "?fen=" + fen, { signal })
                .then((response) => response.json())
-               .then((data) => { show_explore_hash_results(data, fen); });
+               .then((data) => { show_explore_hash_results(data, fen); })
+               .catch((err) => {});
 }
 
 /** Process the JSON response from a hash probe request.