From 85371239a7e86d6e5f5dd13196abf0e923b49b4e Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Thu, 27 Mar 2014 14:36:49 +0100 Subject: Fixed nickname coloring in chatlog. Didn't work that way with webkit and blink. Also removed logging of color --- static/chat.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'static/chat.js') 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($("
  • ").css("color", col).text(nick)); } } @@ -54,7 +53,7 @@ function chatlogWriter(event) { break; } - var elemNick = $("").addClass("nick").prop("style", "color: " + buddyColors[data.user]).text(data.user); + var elemNick = $("").addClass("nick").css("color", buddyColors[data.user]).text(data.user); var elemText = $("").addClass("msg").text(msgtext); var logentry = $("
  • ").addClass(data.type).append(elemNick).append(elemText); $("#chatlog").append(logentry); -- cgit v1.2.3-54-g00ecf