Easier to see where people chat from

This commit is contained in:
Kasper Rynning-Tønnesen
2017-10-11 14:39:22 +02:00
parent ec2ea167b3
commit 80c37d9cba
4 changed files with 12 additions and 3 deletions

View File

@@ -119,7 +119,7 @@ var Chat = {
var color_temp = Helper.rgbToHsl([color.r, color.g, color.b], false);
var _time = new Date();
var time = Helper.pad(_time.getHours()) + ":" + Helper.pad(_time.getMinutes());
$("#chatall").append("<li title='"+inp.channel+"''><span class='time_color'>" + time + "</span> <span style='color:"+color_temp+";'>"+inp.from+"</span></li>");
$("#chatall").append("<li title='"+inp.channel+"''><span class='time_color'>" + time + "</span> <span style='color:"+color_temp+";'>"+inp.from+"</span><span class='channel-info-all-chat'> " + inp.channel + " </span></li>");
var in_text = document.createTextNode(inp.msg);
$("#chatall li:last")[0].appendChild(in_text);
document.getElementById("chatall").scrollTop = document.getElementById("chatall").scrollHeight;