diff --git a/raspberry/roberto/views/frontend/templates/index.html b/raspberry/roberto/views/frontend/templates/index.html index fbe91c7..447b20d 100644 --- a/raspberry/roberto/views/frontend/templates/index.html +++ b/raspberry/roberto/views/frontend/templates/index.html @@ -200,6 +200,9 @@ socket.on('text', (data) => { var new_message = document.createElement('p'); new_message.innerHTML = data.data; chatlog.append(new_message); + if (chatlog.children.length > 10) { + chatlog.children[0].remove(); + } }); function displayText(text, left, top) {