From 7545e83cfbd56fb2f3773718f50773db142ef1d5 Mon Sep 17 00:00:00 2001 From: Tristan Schneider Date: Thu, 10 Dec 2020 20:09:21 +0100 Subject: [PATCH] word input in color of user whose turn it is --- index.php | 9 ++++++++- style.css | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index ac69c23..28e3a8a 100644 --- a/index.php +++ b/index.php @@ -73,7 +73,7 @@ $config_data = json_decode($raw_json_config, false);

- +
Nächstes Wort:
Nächstes Wort:
@@ -102,6 +102,13 @@ $config_data = json_decode($raw_json_config, false); } } previousTextLength = text.length; + + // 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]; + //console.log(histurnspan.getAttribute("style")); + document.getElementById("wordinput").setAttribute("style", histurnspan.getAttribute("style")); }); }); } diff --git a/style.css b/style.css index 93b0b2b..1e81c39 100644 --- a/style.css +++ b/style.css @@ -19,6 +19,11 @@ a { color: black; } + #wordinput { + color: black; + background-color: white; +} + table { font-size: inherit; }