mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Time on chat
This commit is contained in:
2
server/public/assets/dist/embed.min.js
vendored
2
server/public/assets/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
2
server/public/assets/dist/main.min.js
vendored
2
server/public/assets/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -98,7 +98,9 @@ allchat: function(inp) {
|
||||
}
|
||||
color = Helper.hexToRgb(color.substring(0,6));
|
||||
var color_temp = Helper.rgbToHsl([color.r, color.g, color.b], false);
|
||||
$("#chatall").append("<li title='"+inp.channel+"''><span style='color:"+color_temp+";'>"+inp.from+"</span></li>");
|
||||
var _time = new Date();
|
||||
var time = Helper.pad(_time.getHours()) + ":" + Helper.pad(_time.getMinutes());
|
||||
$("#chatall").append("<li title='"+inp.channel+"''>" + time + " <span style='color:"+color_temp+";'>"+inp.from+"</span></li>");
|
||||
var in_text = document.createTextNode(inp.msg);
|
||||
$("#chatall li:last")[0].appendChild(in_text);
|
||||
document.getElementById("chatall").scrollTop = document.getElementById("chatall").scrollHeight;
|
||||
@@ -130,7 +132,9 @@ channelchat: function(data) {
|
||||
}
|
||||
color = Helper.hexToRgb(color.substring(0,6));
|
||||
var color_temp = Helper.rgbToHsl([color.r, color.g, color.b], false);
|
||||
$("#chatchannel").append("<li><span style='color:"+color_temp+";'>"+data.from+"</span></li>");
|
||||
var _time = new Date();
|
||||
var time = Helper.pad(_time.getHours()) + ":" + Helper.pad(_time.getMinutes());
|
||||
$("#chatchannel").append("<li>" + time + "<span style='color:"+color_temp+";'>"+data.from+"</span></li>");
|
||||
var in_text = document.createTextNode(data.msg);
|
||||
$("#chatchannel li:last")[0].appendChild(in_text);
|
||||
document.getElementById("chatchannel").scrollTop = document.getElementById("chatchannel").scrollHeight;
|
||||
|
||||
Reference in New Issue
Block a user