Skip to content

Instantly share code, notes, and snippets.

@rtgibbons
Created July 5, 2012 04:51
Show Gist options
  • Select an option

  • Save rtgibbons/3051451 to your computer and use it in GitHub Desktop.

Select an option

Save rtgibbons/3051451 to your computer and use it in GitHub Desktop.
JS Snippet to hide subsequent nick's in Textual
var $bodyHome = $('#body_home'),
$newLine,
$prevLine,
$newLineNick;
$bodyHome.on('DOMSubtreeModified', function() {
$newLine = $bodyHome.find('.line').last();
$prevLine = $newLine.prev();
$newLineNick = $newLine.find('.sender').attr('nick');
if ( $newLineNick === $prevLine.find('.sender').attr('nick')) {
$newLine.find('.sender').css({'color': 'transparent'});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment