Fixed newly created issue of timestamps of chat

This commit is contained in:
Kasper Rynning-Tønnesen
2018-09-20 16:48:42 +02:00
parent 836f96f7b2
commit 7646f5183b

View File

@@ -58,6 +58,10 @@ var Chat = {
add = "chatchannel";
}
for(var x = 0; x < Chat.chat_help.length; x++) {
var _time = new Date();
var time = Helper.pad(_time.getHours()) + ":" + Helper.pad(_time.getMinutes());
document.querySelector("#" + add).insertAdjacentHTML("beforeend", "<li title='Zoff''><span class='time_color'>" + time + "</span> <img class='chat-icon' src='https://zoff.me/assets/images/favicon-32x32.png' alt='System'><span style='color:orange;'>System</span>: </li>");
var in_text = document.createTextNode(Chat.chat_help[x]);
document.querySelector("#" + add).children[document.querySelector("#" + add).children.length - 1].appendChild(in_text);