Skip to content

Instantly share code, notes, and snippets.

@avidal
Created December 5, 2012 15:07
Show Gist options
  • Save avidal/4216238 to your computer and use it in GitHub Desktop.
Save avidal/4216238 to your computer and use it in GitHub Desktop.
Clear up the backlog in the selected channel in irccloud
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