Get rid of blocked tweeps coming back in your timeline through RTs and mentions with Greasemonkey.

So, have you ever had to deal with this frustrating experience: blocking a user on Twitter, and seeing that user back and again in your timeline through RTs an mentions?
If yes, this little script can help you.

It will replace any tweet containing that user's name with "Just another tweet", so your adrenalin never spikes again.

You will need Mozilla Firefox and Greasemmonkey to run it. I can't host .js files, so you will have to follow the tutorial below in order to install the script. It's currently designed for one username only, but I could enhance it later, if ever you asked and treated me for a pizza.

Here is the tutorial:

1) Install the GreaseMonkey add-on . After installation, you should see a monkey icon on the botton-right of your browser, that's where you can manage your scripts, deactivate and reactivate Greasemonkey.

2) After installing, go to Tools -> Greasemonkey -> New user script

3) Fill in the blanks:

4) Greasemonkey will ask you for your favorite text editor, notepad or textedit will do

5) Copy and paste the following, fill the blank space between the quotes with the username you want to block (keep the quote marks, no need for a @), save and close.

For Twitter:


// ==UserScript==
// @name           TwErazer
// @namespace      TwErazer
// @include        http://www.twitter.com/
// @include        http://twitter.com
// @include           http://*.twitter.com/*
// ==/UserScript==

erazeme = "     ";
setInterval(function()
{
    el = document.getElementsByTagName('span');
    for(i=0;i<el.length;i++)
    {
        if (el[i].className == "entry-content")
            {
                str = el[i].innerHTML;
                if (str.match(erazeme))
                {
                    el[i].innerHTML = "Just another tweet";
                }
             }
    }
    el = "";
}
, 5000);


For "New Twitter"


// ==UserScript==
// @name           TwErazer_new
// @namespace      TwErazer_new
// @include        http://www.twitter.com/
// @include        http://twitter.com
// @include        http://*.twitter.com/*
// ==/UserScript==

erazeme = "    ";
setInterval(function()
{
    el = document.getElementsByTagName('div');
    for(i=0;i<el.length;i++)
    {
    if (el[i].className == "stream-item")
        {
        subEl = el[i].children[1].children[2].children[1];
        str = subEl.innerHTML;
            if (str.match(erazeme))
            {
            subEl.innerHTML = "Just another tweet";
            }
        }


    }
    el = "";
    srt = "";
}
,5000);

 

6) Go to Twitter,  breathe.

7) You can test the script with any word or username you want.

Voila, hope it's helpful :)

Posted via email from @Danny_Fr

0 Responses to "Get rid of blocked tweeps coming back in your timeline through RTs and mentions with Greasemonkey."

Post a Comment

Tell me how much you hate it.