Getting rid of “promoted tweets”

While I now use Twitter solely as a ROM — read-only — I still use it quite a bit. One thing that annoys me — I mean, apart from the mangled English that passes for a bona fide language — is the new “promoted tweets” feature (I am using this word very loosely). 唔鐘意. Do. Not. Like. On my Mac I use mostly hootsuite. So I had a look at the source, and identified how the “special” tweets were identified. I then added a GreaseMonkey script to my collection:

// ==UserScript==
// @name           no promoted tweets
// @namespace
// @include*
// @include*
// ==/UserScript==

function getElementsByClassName(oElm, strTagName, strClassName){
var arrElements = (strTagName == “*” && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
//    strClassName = strClassName.replace(/\-/g, “\\-“);
//    var oRegExp = new RegExp(“(^|\\s)” + strClassName + “(\\s|$)”);
var oElement;
var tableau;
for(var i=0; i<arrElements.length; i++){
oElement = arrElements[i];
return (arrReturnElements)

var e;

e = getElementsByClassName(document, “div”, “message _message _promoted message-promoted”);
var i,j,n, txt, pos, pos1;

for(i=0;i<j;i++) {

It works also on Safari, if you install GreaseKit. Bye bye, disguised ads.


One response to “Getting rid of “promoted tweets”

  1. Will Leshner

    Aha. So this is why I’m not seeing your tweets lately. I’ve been using Twitter in ROM mode a lot lately myself, though I’m beginning to do a bit more tweeting.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s