delete old chat messages
parent
a836edfc04
commit
7075cffadb
|
@ -121,7 +121,10 @@ socket.on('speak', function(json) {
|
|||
register_new_elements(line2);
|
||||
bs_trigger(line2)
|
||||
|
||||
if (scrolled_down || json.user_id == vid) {
|
||||
if (scrolled_down && document.getElementsByClassName('chat-message').length > 250)
|
||||
document.getElementsByClassName('chat-group')[0].remove()
|
||||
|
||||
if (scrolled_down || json.user_id == vid) {
|
||||
box.scrollTo(0, box.scrollHeight)
|
||||
setTimeout(function() {
|
||||
box.scrollTo(0, box.scrollHeight)
|
||||
|
|
Loading…
Reference in New Issue