DeClutter Twitter 29

Updated 27/10/2014 to handle new twitter layout.

Twitter can be a very useful tool, particularly once you’ve built up a decent-sized network of people with interests common to your own. The twitter timeline is often compared to being in a pub filled exclusively with your friends, and being able to hear all of the conversations going on at once.

However, just as you have that friend who occasionally likes to go in to excruciating detail about his collection of porcelain squirrels, there are times when your interests diverge and you’d rather not hear the full details of next weekend’s Porcelainathon. And so it is with Twitter.

Once you’ve started following more than a handful of people, you’ll occasionally find your timeline filling up with tweets about things that you’re really not that interested in. You’d rather not take the nuclear option and unfollow those involved, as they generally have interesting/useful tweets. But equally you’d rather not have to scroll through 3 pages of automated tweets about foursquare checkins, app downloads and the like.


Enter DeClutter

DeClutter is a javascript bookmarklet which will remove from your timeline any tweets which match a “blacklist” of keywords you’ve defined.

Below you can enter a series of terms which you want to banish from your timeline (one term per line). After entering them, you can either copy and paste the resulting javascript in to a bookmarklet in your browser, or drag the DeClutter Twitter link at the bottom of the page to your browser’s bookmarks bar.

Once it has been saved, log on to and click your new bookmarklet. Straight away you should see tweets disappearing from the timeline. This filter will re-apply itself automatically in the background every time you click “more”, “@ replies”, etc, so you don’t need to re-click the bookmarklet whenever your timeline is refreshed.
This can lead to some odd behaviour, such as only 3-4 tweets appearing instead of 20 when you click “more”, or not additional tweets appearing when you click the blue “new tweets” bar. This means that tweets which have been loaded matched your filters, and have been removed without ever being displayed to you.


Customise DeClutter

Enter words or phrases you wish to banish from your timeline below. Alternatively, you can try one of the below general category links to get you started!
Sport | Irish Politics | Computer games | Auto-tweets

Enter keywords below:


Your bookmarklet

The text below will automatically update as you enter keywords above. When you’re done adding, copy the below text in to a new bookmarklet.


Alternatively, drag this DeClutter bookmarklet to your browser’s bookmark bar.


What now?

After dragging the bookmarklet to your browser’s bookmark bar, log in to, click it and that’s all there is to it!

If you’ve got any suggestions for refinements to this bookmarklet, let me know in the comments below. Equally, feel free to share your own list of keyword filters for inclusion on the category list above!


The Tech Bit

The twitter web interface presents the timeline as a styled list. Each list element has a number of classes, chief amongst them “hentry”.
The declutter function inside the bookmarklet loops through all elements with the class “hentry” on the currently-visible page, then checks whether any of the blacklisted keywords are present in the html of that element.

function declutter()
    // Remove tweets containing these terms!
    var rk=['election'];
    // Twitter timeline entries have class "stream-item" - loop through them,
    // removing those that match blacklisted term
    $.each($(''), function()
        var c = $(this).html();
        var p = $(this);
        // Iterate through the keywords, removing the parent element
        // where a match is found
        $.each(rk, function(i, v)
            // Lower-case the text so case issues don't trip us up
            if(c.toLowerCase().indexOf(v.toLowerCase()) > 0)

Updated 28/03/2010 – we’re now using the ajaxSuccess event, rather than the crude, browser-crashery and slightly hacky setTimeout call!

Of course, this bookmarklet wouldn’t be all that useful if you had to re-apply it every time you click “@ replies”, “more”, “new tweets”, etc. In order to have the filters be re-applied automatically, we can bind it to the ajaxSuccess event. This event is conveniently fired by jQuery

whenever an Ajax request completes successfully… Any and all handlers that have been registered with the .ajaxSuccess() method are executed at this time.

As all of the various twitter timelines are loaded via ajax requests, binding the declutter function to this event ensures that it will be re-run after each successful loading of the timeline, meaning that we don’t have to worry about manually re-applying the bookmarklet.


We then wrap the call to declutter() up in a void() call to prevent the browser from opening a new page, and that’s all there is to it!



Will I still see the hidden tweets if I use Tweetie/Echofon/Twitter API?
Yes, this bookmarklet only affects the web interface to twitter.

Will this bookmarklet automatically run every time I visit
If you have closed your browser or the tab in which you first ran the bookmarklet, then you will need to start it again.

On which browsers have you tested this?
It’s been tested in the latest versions of Firefox, IE & Chrome. If you’re using an earlier version of any of these, it *should* work, but YMMV. If it fails horribly in earlier browsers, let me know via the comments below and I’ll see about updating it.

You say ‘bookmarklet’ a lot. What is that?
A bookmarklet is a small application, stored as the URL of a bookmark in a web browser or as a hyperlink on a web page, or so sayeth the wiki.

I’m not particularly technical – can you explain how exactly I ‘save’ a bookmarklet?
I’ve put together a quick introduction to bookmarklets which will hopefully make things a bit clearer!

Hmm. I think there’s a better way of doing this
This has been hacked together very quickly using a few basic jQuery functions, I’m sure there’s plenty of room for improvement! If you’ve got suggestions for improvement, let me know via the comments below.

How very Web2.0 – why didn’t you call it DeCluttr?
I did originally, then discovered that the name had already been taken. After that I tried to come up with a catchy new name, but naming things is hard.

You should have some pictures on this post. I like pictures.
That’s not really a question. Still, if you must, have an image.

29 thoughts on “DeClutter Twitter

  1. Pingback: DeCluttering Twitter, Part Deux «

  2. Reply Barry Hand Mar 31,2010 2:18 pm

    Good job, going to give this a try later

  3. Reply Paul Apr 1,2010 2:51 pm

    Thanks Barry – I’ve been hacking around with various parts of the twitter web interface a bit lately, so any and all feedback gratefully accepted! (getting rid of hovercards was another quick hack along these lines – damn things kept popping up in all the wrong places!)

  4. Reply TwitTwat Apr 2,2010 9:52 am

    Please see COMMENT on previous page….I really AM a TwitTwat…sorry

  5. Pingback: Bookmarklets – a quick explanation! «

  6. Reply Paul Apr 4,2010 1:58 am

    @TwitTwat, I’ve stuck up a new post giving a quick introduction to bookmarklets which will hopefully make things a bit cleare! I’ve also now updated the post above with this link.

  7. Pingback: A Grab Bag of Bookmarklets «

  8. Pingback: Fluffy Links – Wednesday May 19th 2010 « Damien Mulley

  9. Pingback: DeClutter Filters Out Unwanted Tweets From Your Twitter Feed | Lifehacker Australia

  10. Reply emil Sep 27,2010 10:41 pm

    Hm, I couldn’t get it to remove anything with “RT” in it. Am I doing something wrong?

  11. Reply emil Sep 27,2010 10:45 pm

    Ah, I just realized — it doesn’t work with the new twitter. D’oh.

  12. Pingback: just a geek girl..... | Remove Annoying Tweets from your Timeline with DeClutter

  13. Pingback: DeClutter Gets Rid of Unwanted Tweets | Blog | ZiggyTek

  14. Reply Marcelo Wolfgang Sep 28,2010 5:47 am

    Some things that I really like to see here

    RegEx for the string so we can match urls and/or emails
    multi words match like “RT+promotion”

  15. Pingback: Ongewenste onderwerpen filteren op Twitter site | Twittermania

  16. Pingback: Episode 30 – Followerverlust LIVE » Google, Robert, Tipps, Susanne » Podcast

  17. Pingback: Get Rid of Tweets You Don’t Want With DeClutter | A Perfectly Paper Blog

  18. Pingback: Extending Twitter – adding Imgur previews «

  19. Pingback: Avoid SXSW news flooding through our helpful tips! | Digital Trends

  20. Pingback: How Twitter Ruined ‘Game of Thrones’: A Guide to Social Media Spoiler Etiquette

  21. Pingback: Twitter-Blackliste: Tweets mit definierten Wörtern ausblenden - CHIP

  22. Pingback: Esconda posts sobre política de um jeito bem fácil

  23. Pingback: How to Block Posts About the Insanity-Inducing Dress from the Internet » Ewn.Cz

  24. Pingback: Outrage Porn Is Making You Angry And Dumb, Stop Looking At It •

  25. Reply @AyaSeit Nov 28,2016 12:56 am

    Wow, I just discovered this bookmarklet! Extremely useful! Thank you!
    I’m just greatly annoyed by political tweets in my timeline. I don’t want to unfollow certain people, and respect their political views, however I don’t want to see these tweets in my timeline.
    Thank you again!

  26. Reply dcra Dec 4,2016 9:34 am

    Love this. So useful, thanks a million.

  27. Reply Gemma Jan 28,2017 9:10 am

    Cool bookmarklet. Thanks for this. 🙂

    It would be nice if there was also a solution for images that appear in my feed that are about anything to do with Trump. I have one in my feed where the image is the message, but the tweet itself doesn’t contain the word Trump. Therefore it doesn’t get excluded. See what I mean:

  28. Reply Peter Mar 4,2017 12:45 pm


    This sounds lovely, I have 3 questions, if you don’t mind:

    Can this work on mobile chrome?
    Is it possible to see the full code?
    What (if anything) is shared outwardly?


  29. Reply conroyp Mar 7,2017 10:04 am

    Hi Peter,

    It’s possible to use bookmarklets on mobile chrome, but it’s not too user-friendly a process I’m afraid –

    The full code is in the text box under “Your bookmarklet”, updated as you change keywords.

    Not sure what you mean by shared outwardly.. There’s no external tracking of usage of this bookmarklet, if that’s what you mean – it runs on your device and doesn’t make any external calls.

    All the best,

Leave a Reply