X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=7b030cab1cf491d9aa786fdad89aec19164ae702;hb=026c621f8c912aba3f53be9057078eefe9c92c6f;hp=ee7495f1b138329f857fe0db1e9e8d2a58461176;hpb=8a081ee7e5002aa4ded8e0ac9cdd08a8ca8c80a5;p=remoteglot diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index ee7495f..7b030ca 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -897,8 +897,11 @@ let update_refutation_lines = function() { continue; } - let move = "" + line['move'] + ""; - move_td.innerHTML = move; + let move_link = document.createElement("a"); + move_link.classList.add("move"); + move_link.setAttribute("href", "javascript:show_line(" + display_lines.length + ", 0)"); + move_link.textContent = line['move']; + move_td.appendChild(move_link); let score_td = document.createElement("td"); tr.appendChild(score_td); @@ -1223,6 +1226,9 @@ let update_board = function() { return; } + if (clock_timer !== null) { + clearTimeout(clock_timer); + } update_clock(); // The score. @@ -1494,7 +1500,7 @@ let update_num_viewers = function(num_viewers) { } let update_clock = function() { - clearTimeout(clock_timer); + clock_timer = null; let data = displayed_analysis_data || current_analysis_data; if (!data) return;