From d9add805c3b556d2fa357713bda577f4dc6f2d49 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Tue, 3 May 2022 07:54:36 -0700 Subject: web: buffer and flush prompt --- web/static/dartboat.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'web/static/dartboat.js') diff --git a/web/static/dartboat.js b/web/static/dartboat.js index 719bd8d..359abbd 100644 --- a/web/static/dartboat.js +++ b/web/static/dartboat.js @@ -50,16 +50,16 @@ function setPromptInactive() { $('#prompt').classList.remove('active') } -function setPromptInput(ptr) { - $('#prompt-input').textContent = UTF8ToString(ptr); +function setPromptMsgL(ptr) { + $('#prompt-msg-l').textContent = ptr ? UTF8ToString(ptr) : ''; } -function promptMsgL(ptr) { - $('#prompt-msg-l').textContent = UTF8ToString(ptr); +function setPromptMsgR(ptr) { + $('#prompt-msg-r').textContent = ptr ? UTF8ToString(ptr) : ''; } -function promptMsgR(ptr) { - $('#prompt-msg-r').textContent = UTF8ToString(ptr); +function setPromptInput(ptr) { + $('#prompt-input').textContent = ptr ? UTF8ToString(ptr) : ''; } function setKeypad(keypad) { @@ -98,15 +98,15 @@ function hidePlayerInfo(n) { } function updatePlayerName(n, ptr) { - $(`#p${n}-name`).textContent = ptr && UTF8ToString(ptr); + $(`#p${n}-name`).textContent = ptr ? UTF8ToString(ptr) : ''; } function updatePlayerRem(n, ptr) { - $(`#p${n}-rem`).textContent = ptr && UTF8ToString(ptr); + $(`#p${n}-rem`).textContent = ptr ? UTF8ToString(ptr) : ''; } function updatePlayerSugg(n, ptr) { - $(`#p${n}-sugg`).textContent = ptr && UTF8ToString(ptr); + $(`#p${n}-sugg`).textContent = ptr ? UTF8ToString(ptr) : ''; } function updatePlayerAvg(n, avg) { -- cgit v1.2.3-70-g09d2