Skip to content

Instantly share code, notes, and snippets.

@jnaglick
Created October 10, 2014 20:57
Show Gist options
  • Save jnaglick/095da14ed3cafb7bf320 to your computer and use it in GitHub Desktop.
Save jnaglick/095da14ed3cafb7bf320 to your computer and use it in GitHub Desktop.
hipchat-ignore.js
var chat_name = 'chat_name'
var username_to_ignore = 'username_to_ignore'
$('[name="' + chat_name + '"]').bind('DOMSubtreeModified', function() {
var user = $('[name="115195_econify@conf.hipchat.com"] .nameBlock:visible').last().text();
if (user == username_to_ignore) {
$('[name="115195_econify@conf.hipchat.com"] .nameBlock:visible').last().remove();
$('[name="' + chat_name + '"] .msgText').last().remove();
console.log('removed txt.');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment