X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=e14fffa2b81394d6c63645182414e7ca1a142119;hb=66e4755548c69077058eecb08d907f59907bb2b4;hp=1218dd3cbe9ae719b4409374564c1fb37510db6f;hpb=acd621a2b1ef230d14b954c6d39822c68618ce21;p=remoteglot diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 1218dd3..e14fffa 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -1903,7 +1903,7 @@ function update_move_highlight() { document.getElementById("pvtitle").textContent = "Exploring:"; current_display_line.start_display_move_num = 0; display_lines.push(current_display_line); - document.getElementById("pv").append(print_pv(display_lines.length - 1, null)); // FIXME + document.getElementById("pv").replaceChildren(print_pv(display_lines.length - 1, null)); // FIXME display_line_num = display_lines.length - 1; // Clear out the PV, so it's not selected by anything later. @@ -2482,6 +2482,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();