diff options
| author | sD <stoned@derpymail.org> | 2020-02-13 18:01:34 +0100 |
|---|---|---|
| committer | sD <stoned@derpymail.org> | 2020-02-13 18:01:34 +0100 |
| commit | 1de76d8d8f949c819314e94265cae12d8de78089 (patch) | |
| tree | 8961c5672ed2eb6b74b5444445689af876acde78 /webAO/client.js | |
| parent | 65ad652aa950c55158441c520d96856d6391d013 (diff) | |
handle text colors in css
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/webAO/client.js b/webAO/client.js index f51f4f6..777a560 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -1163,15 +1163,15 @@ class Viewport { }; this.colors = [ - "#ffffff", // white - "#00ff00", // green - "#ff0000", // red - "#ffa500", // orange - "#4596ff", // blue - "#ffff00", // yellow - "#fedcba", // 6 is rainbow. - "#ffc0cb", // pink - "#00ffff" // cyan + "text_white", + "text_green", + "text_red", + "text_orange", + "text_blue", + "text_yellow", + "text_rainbow", + "text_pink", + "text_cyan" ]; this.blip = new Audio(AO_HOST + "sounds/general/sfx-blipmale.wav"); @@ -1571,12 +1571,8 @@ class Viewport { chatBox.style.display = "block"; chatBox.style.fontSize = (chatBox.offsetHeight * 0.25) + "px"; - if (this.chatmsg.color === 6) - chatBoxInner.className = "rainbow-text"; - else { - chatBoxInner.className = ""; - chatBoxInner.style.color = this.colors[this.chatmsg.color] || "#ffffff"; - } + chatBoxInner.className = this.colors[this.chatmsg.color]; + this.chatmsg.startspeaking = false; if (this.chatmsg.preanimdelay === 0) { |
