From fcf01353f94b11b8ca6db8ead14d2ec89a0275f4 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Mon, 15 Feb 2021 14:55:16 -0500 Subject: Get on track for moving cards around --- scripts/gui/chat.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'scripts/gui/chat.js') diff --git a/scripts/gui/chat.js b/scripts/gui/chat.js index 68b8f5d..fa4b88d 100644 --- a/scripts/gui/chat.js +++ b/scripts/gui/chat.js @@ -101,11 +101,20 @@ class Chat { let autoscroll = c.e.scrollTop == c.e.scrollTopMax; - let csp = document.createElement("span"); - csp.style.color = msg.color; - csp.innerText = msg.user + ": "; + let csp = document.createElement("span") let tsp = document.createElement("span"); - tsp.innerText = msg.text; + + if(msg.server === true){ + csp.style.color = "white"; + csp.style.backgroundColor = "black"; + csp.innerText = "[SERVER]"; + tsp.innerText = " " + msg.text; + } else { + csp.style.color = msg.color; + csp.innerText = msg.user + ": "; + tsp.innerText = msg.text; + } + let d = document.createElement("div"); d.appendChild(csp); d.appendChild(tsp); -- cgit v1.2.3