Created
October 10, 2014 20:57
-
-
Save jnaglick/095da14ed3cafb7bf320 to your computer and use it in GitHub Desktop.
hipchat-ignore.js
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 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