Archived
1
0

update rollover in livechan

This commit is contained in:
Jeff Becker 2016-07-04 12:50:00 -04:00
parent 4a8861761d
commit 9c038021b5
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B

View File

@ -1120,8 +1120,9 @@ Chat.prototype.scroll = function() {
Chat.prototype.rollover = function() { Chat.prototype.rollover = function() {
var self = this; var self = this;
var chatSize = self.options.scrollback || 50; var chatSize = self.options.scrollback || 50;
while ( this.chatElems.output.childNodes.length > chatSize ) { var e = self.chatElems.output;
this.chatElems.output.childNodes.removeChild(this.chatElems.output.childNodes[0]); while ( e.childNodes.length > chatSize ) {
e.childNodes[0].remove();
} }
} }