Use interval to clear inactive channel buffers

This commit is contained in:
Mattias Erming 2014-12-12 00:01:19 +01:00
parent 07a509a862
commit a1f864b511
1 changed files with 10 additions and 1 deletions

View File

@ -735,9 +735,18 @@ $(function() {
}
});
setInterval(function() {
chat.find(".chan:not(.active)").each(function() {
var chan = $(this);
if (chan.find(".messages").children().slice(0, -100).remove().length) {
chan.find(".show-more").addClass("show");
}
});
}, 1000 * 10);
function clear() {
chat.find(".active .messages").empty();
chat.find(".active .show-more").removeClass("hidden");
chat.find(".active .show-more").addClass("show");
}
function complete(word) {