KestrelAu / Welldone Filter

// ==UserScript==
// @name          Welldone Filter
// @description   Limit your exposure to inanity
// @version       1
// @namespace     www.aussienzro2.com.au
// @require       http://code.jquery.com/jquery-1.9.1.js
// @include       http://www.aussienzro2.com.au/forums/*
// ==/UserScript==

//Cleanse the shoutbox
if (window.location.href.indexOf("forums/") == window.location.href.length - "forums/".length) {
    setTimeout(function() {
        $('img[title^="Welldone the Pussyhand"]').each(function() {
            var contents = $(this).parent().contents();
            contents.slice(contents.index($(this)) + 1, contents.index($(this).next())).remove();	    
            $(this).toggle();
            $(this).next().toggle();
            $(this).next().next().toggle();
        });
    }, 2000);
}

//Cleanse threads
if (window.location.href.indexOf("forumdisplay.php") >= 0) {
    $("div.author:contains('Welldone the Pussyhand')").each(function() {
        $(this).parent().parent().parent().toggle();
    });
}

//Cleanse posts
if (window.location.href.indexOf("showthread.php") >= 0) {
    $("div.post_user_details").find("span:contains('Welldone the Pussyhand')").each(function() {
        $(this).parent().parent().parent().parent().parent().parent().toggle();
    });
}