Selectively hide posts on Facebook using Greasemonkey

Unlike a lot of people, I don’t happen to be a fan of Soccer. I know thats a bit difficult to believe, especially with this World cup season going on. Since the last few days, I’ve been waking up in the morning to a facebook full of soccer posts. I tried to tolerate it for a while, but then I realized that I couldn’t take it anymore, so I wrote this simple Greasemonkey script to hide all the posts on facebook containing the term soccer.

Named “I hate Soccer”, this script hides all the facebook posts that contain the word soccer.

In order to see it working, you need to install Greasemonkey addon for mozilla. from here. Once installed, just navigate to the URL: http://texens.5gigs.net/webpage/iHateSoccer.user.js

You’ll see a dialog box come up, select install and that’s all. You won’t see any posts that contain the term soccer from now onwards on facebook.

The source code for the script:


// ==UserScript==
// @name           I Hate Soccer
// @namespace      none
// @description    removes all posts containing the keyword soccer
// @date           2010-06-13
// @author         texens
// @include        http://www.facebook.com/*
// @require        http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// ==/UserScript==

$(document).ready(function() {
$("h6:contains('soccer')").parent().parent().parent().hide();
});

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s