summaryrefslogtreecommitdiff
path: root/scripts/gui/chat.js
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2021-02-15 14:55:16 -0500
committerKyle Gunger <kgunger12@gmail.com>2021-02-15 14:55:16 -0500
commitfcf01353f94b11b8ca6db8ead14d2ec89a0275f4 (patch)
tree89b01bd941854f83477ba6cb3b7e283f95bf710a /scripts/gui/chat.js
parent8798a7f1fbdbf13ca31d21c0242fbfa26bf36b6a (diff)
Get on track for moving cards around
Diffstat (limited to 'scripts/gui/chat.js')
-rw-r--r--scripts/gui/chat.js17
1 files changed, 13 insertions, 4 deletions
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);