Skip to content

Instantly share code, notes, and snippets.

@romac
Created November 29, 2010 21:09
Show Gist options
  • Select an option

  • Save romac/720625 to your computer and use it in GitHub Desktop.

Select an option

Save romac/720625 to your computer and use it in GitHub Desktop.
A little bookmarklet which removes tweets starting with a @ from the Twitter timeline.
// Thanks to @defunkt, you can find a draggable version of this bookmarklet here:
// http://bookmarklets.heroku.com/bookmarklets/1796
// If you prefer to create it yourself here is the one-line version:
// javascript:(%20function(%20$%20){$(%20%27.tweet-text%27%20).each(function(){var%20$this%20=%20$(%20this%20);if(%20$.trim(%20$this.html()%20)[%200%20]%20===%20%27@%27%20){$this.closest(%20%27.stream-item%27%20).fadeOut();}});}%20)(%20jQuery%20);
// And if you really want to start from scratch:
( function( $ )
{
$( '.tweet-text' ).each(
function()
{
var $this = $( this );
if( $.trim( $this.html() )[ 0 ] === '@' )
{
$this.closest( '.stream-item' ).fadeOut();
}
}
);
} )( jQuery );
@defunkt
Copy link

defunkt commented Nov 29, 2010

Love it! Made it into an easily draggable bookmarklet: http://bookmarklets.heroku.com/bookmarklets/1796

@romac
Copy link
Author

romac commented Nov 29, 2010

@defunkt: Thank your very much for the draggable version. Glad you liked it!

@romac
Copy link
Author

romac commented Nov 29, 2010

Here is another version which does the same in live. It is also toggleable.
https://gist.github.com/720748

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment