diff options
| author | stonedDiscord <stoned@derpymail.org> | 2018-03-09 20:04:17 +0100 |
|---|---|---|
| committer | stonedDiscord <stoned@derpymail.org> | 2018-03-09 20:04:17 +0100 |
| commit | acad2878cc1d20608abc72e20273203eb138df24 (patch) | |
| tree | 0e27aeea499c04d17f65a3f12fccfa6e6373c03d | |
| parent | fafef84f6a747322bc782b7c1fce95546c059474 (diff) | |
color
that was an easy one
why is no one else helping me with this
| -rw-r--r-- | client.js | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -302,6 +302,30 @@ function updateText() { document.getElementById("client_name").style.fontSize = (document.getElementById("client_name").offsetHeight * 0.7) + "px"; document.getElementById("client_chat").style.fontSize = (document.getElementById("client_chat").offsetHeight * 0.2) + "px"; document.getElementById("client_name").innerHTML = "<p>" + escapeHtml(chatmsg.nameplate) + "</p>"; + switch(chatmsg.color){ + case "0": + stylecolor="color: #ffffff;"; + break; + case "1": + stylecolor="color: #00ff00;"; + break; + case "2": + stylecolor="color: #ff0000;"; + break; + case "3": + stylecolor="color: #ffaa00;"; + break; + case "4": + stylecolor="color: #0000ff;"; + break; + case "5": + stylecolor="color: #ffff00;"; + break; + case "6": + stylecolor="color: #aa00aa;"; + break; + } + document.getElementById("client_inner_chat").style = stylecolor; changebg(chatmsg.side); chatmsg.startspeaking = false; document.getElementById("client_char").src = AO_HOST + "characters/" + chatmsg.name + "/" + chatmsg.speaking + ".gif"; |
