X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=54fc90b46afc5d5e818ddb87bd9a7cfaa41b33b6;hb=f120f5172ba09d12928acc7228e4aa331cbdc190;hp=ae522e26113c9869d61ef81d47bce9d4f046c4d7;hpb=0b8e23ee197dcc239a1ea0d818b541cba36b98b6;p=remoteglot diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index ae522e2..54fc90b 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -1114,15 +1114,6 @@ function update_board() { headline = 'Analysis'; } - // Credits, where applicable. Note that we don't want the footer to change a lot - // when e.g. viewing history, so if any of these changed during the game, - // use the current one still. - if (current_data['using_lomonosov']) { - document.getElementById("lomonosov").style.display = null; - } else { - document.getElementById("lomonosov").style.display = 'none'; - } - // Credits: The engine name/version. if (current_data['engine'] && current_data['engine']['name'] !== null) { document.getElementById("engineid").textContent = current_data['engine']['name']; @@ -1269,8 +1260,6 @@ function update_board() { // The search stats. if (data['searchstats']) { document.getElementById("searchstats").textContent = data['searchstats']; - } else if (data['tablebase'] == 1) { - document.getElementById("searchstats").textContent = "Tablebase result"; } else if (data['nodes'] && data['nps'] && data['depth']) { let stats = thousands(data['nodes']) + ' nodes, ' + thousands(data['nps']) + ' nodes/sec, depth ' + data['depth'] + ' ply'; if (data['seldepth']) { @@ -1987,7 +1976,8 @@ function update_displayed_line() { function set_board_position(new_fen) { board_is_animating = true; let old_fen = board.fen(); - board.position(new_fen); + let animate = old_fen !== '8/8/8/8/8/8/8/'; + board.position(new_fen, animate); if (board.fen() === old_fen) { board_is_animating = false; } @@ -2482,6 +2472,11 @@ function init() { document.getElementById("board").addEventListener('mousedown', mousedownSquare); document.getElementById("board").addEventListener('mouseup', mouseupSquare); + if (window['inline_json']) { + let j = window['inline_json']; + process_update_response(j['data'], { 'get': (h) => j['headers'][h] }); + delete window['inline_json']; + } request_update(); window.addEventListener('resize', function() { board.resize();