Created
December 5, 2012 15:07
-
-
Save avidal/4216238 to your computer and use it in GitHub Desktop.
Clear up the backlog in the selected channel in irccloud
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var msgs = cb().messages; | |
var lim = 200 /* max of 200 entries in the backlog */; | |
var arr = msgs.toArray().slice(0, msgs.size() - lim); | |
_.each(arr, function(m) { | |
$('div[data-eid='+m.get('eid')+']').remove(); | |
msgs.remove(m); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment