|
@ -200,6 +200,9 @@ socket.on('text', (data) => { |
|
|
var new_message = document.createElement('p'); |
|
|
var new_message = document.createElement('p'); |
|
|
new_message.innerHTML = data.data; |
|
|
new_message.innerHTML = data.data; |
|
|
chatlog.append(new_message); |
|
|
chatlog.append(new_message); |
|
|
|
|
|
if (chatlog.children.length > 10) { |
|
|
|
|
|
chatlog.children[0].remove(); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
function displayText(text, left, top) { |
|
|
function displayText(text, left, top) { |
|
|