From 9c038021b550c8382a806ee8967df988610a1cf2 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 4 Jul 2016 12:50:00 -0400 Subject: [PATCH] update rollover in livechan --- contrib/js/livechan.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/js/livechan.js b/contrib/js/livechan.js index b468319..77aab18 100644 --- a/contrib/js/livechan.js +++ b/contrib/js/livechan.js @@ -1120,8 +1120,9 @@ Chat.prototype.scroll = function() { Chat.prototype.rollover = function() { var self = this; var chatSize = self.options.scrollback || 50; - while ( this.chatElems.output.childNodes.length > chatSize ) { - this.chatElems.output.childNodes.removeChild(this.chatElems.output.childNodes[0]); + var e = self.chatElems.output; + while ( e.childNodes.length > chatSize ) { + e.childNodes[0].remove(); } }