Tab.prototype.flushText bugfix
This commit is contained in:
parent
f5112865aa
commit
5e135313a3
1 changed files with 2 additions and 4 deletions
|
@ -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();
|
||||
|
|
Reference in a new issue