Tab.prototype.flushText bugfix

This commit is contained in:
Rodolphe Breard 2013-01-24 17:30:24 +01:00
parent f5112865aa
commit 5e135313a3

View file

@ -135,10 +135,8 @@ Tab.prototype.setActive = function() {
}
Tab.prototype.flushText = function() {
var str = this.chat_log.innerHTML, sep = "<br>", t = str.split(sep);
if (t.length > this.buff_len + 1) {
this.chat_log.innerHTML = str.substring(str.indexOf(sep) + sep.length);
while (this.chat_log.children.length > this.buff_len) {
this.chat_log.removeChild(this.chat_log.children[0]);
}
while (this.history.length > this.buff_len) {
this.history.shift();