From: Laurent Mazet Date: Mon, 7 Sep 2020 20:32:51 +0000 (+0200) Subject: add score to current player X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=fddf7ee8f38a88b3a0e4625ecfc48246e8c8e328;p=trivabble.git add score to current player --- diff --git a/public/trivabble.js b/public/trivabble.js index 6bc774b..b2a0291 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -1774,7 +1774,12 @@ myConfirm( _("Do you want to add score to active player?") + " " + totalScore, function () { - /* Add score to active player */ + const scoreCell = tablePlayers[currentPlayer].childNodes[2].childNodes[0]; + sendCmds([{ + cmd: "score", + player: currentPlayer, + score: parseInt(scoreCell.textContent) + totalScore + }]); } ); }