From 40fc554954e8c8f4ff7abeaccb7dbd14783908cc Mon Sep 17 00:00:00 2001 From: Tristan Schneider Date: Fri, 26 Jan 2024 17:25:28 +0100 Subject: [PATCH] color of send box is now working correctly for variable user number --- owe.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/owe.js b/owe.js index 974172e..9d2712f 100644 --- a/owe.js +++ b/owe.js @@ -31,8 +31,8 @@ function loadSentences(alertIfNew = false, increaseUnread = true) { // color var spans = document.querySelector(".sentences").getElementsByTagName("span"); - // we expect this to be from the user who's turn it is now (3 users) - var histurnspan = spans[spans.length - 3]; + // we expect this to be from the user who's turn it is now + var histurnspan = spans[spans.length - config_data.users.length]; //console.log(histurnspan.getAttribute("style")); document.getElementById("wordinput").setAttribute("style", histurnspan.getAttribute("style"));