summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2014-03-27 14:36:49 +0100
committerKevin Chabowski <kevin@kch42.de>2014-03-27 23:51:07 +0100
commit85371239a7e86d6e5f5dd13196abf0e923b49b4e (patch)
treea55510ff067d72bea7770010cc8fbf6bd01b5b79 /static
parent9fec1c07ef079c218f15b94f55588a11a3826cdb (diff)
downloadsimplechat-85371239a7e86d6e5f5dd13196abf0e923b49b4e.tar.gz
simplechat-85371239a7e86d6e5f5dd13196abf0e923b49b4e.tar.bz2
simplechat-85371239a7e86d6e5f5dd13196abf0e923b49b4e.zip
Fixed nickname coloring in chatlog.
Didn't work that way with webkit and blink. Also removed logging of color
Diffstat (limited to 'static')
-rw-r--r--static/chat.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/static/chat.js b/static/chat.js
index 0b5d1c9..47cf6d3 100644
--- a/static/chat.js
+++ b/static/chat.js
@@ -23,7 +23,6 @@ function addBuddy(nick) {
if(!found) {
var col = randomColor();
buddyColors[nick] = col;
- console.log(col);
$("#buddies").append($("<li/>").css("color", col).text(nick));
}
}
@@ -54,7 +53,7 @@ function chatlogWriter(event) {
break;
}
- var elemNick = $("<span/>").addClass("nick").prop("style", "color: " + buddyColors[data.user]).text(data.user);
+ var elemNick = $("<span/>").addClass("nick").css("color", buddyColors[data.user]).text(data.user);
var elemText = $("<span/>").addClass("msg").text(msgtext);
var logentry = $("<li/>").addClass(data.type).append(elemNick).append(elemText);
$("#chatlog").append(logentry);