From fddf7ee8f38a88b3a0e4625ecfc48246e8c8e328 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Mon, 7 Sep 2020 22:32:51 +0200 Subject: [PATCH] add score to current player --- public/trivabble.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 + }]); } ); } -- 2.30.2