Greasemonkey script for experts-exchange

I quickly wrote this Greasemonkey script (or Greasekit if you’re using Safari) to remove a bunch of crap from experts-exchange to make it somewhat tolerable to look at. It uses jQuery because I like it. It would be a lot more efficient to include the implementation of the method I’m using in my script rather than making reference to another site, but like I said at the beginning, it was quickly thrown together while waiting for some code to deploy. So here it is in all its glory, Greasemonkey script for experts-exchange:

// ==UserScript==
// @name           BlurredAnsweres
// @namespace      ee
// @include        http://www.experts-exchange.com/*
// ==/UserScript==
// Add jQuery
    var GM_JQ = document.createElement('script');
    GM_JQ.src = 'http://jquery.com/src/jquery-latest.js';
    GM_JQ.type = 'text/javascript';
    document.getElementsByTagName('head')[0].appendChild(GM_JQ);
// Check if jQuery's loaded
    function GM_wait() {
        if(typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(GM_wait,100); }
    else { $ = unsafeWindow.jQuery; letsJQuery(); }
    }
    GM_wait();
// All your GM code must be inside this function
    function letsJQuery() {
        $(".blurredAnswer, .relatedSolutions, .allZonesMain, .qStats, .lightImage").remove();
    }

Leave a Reply

Your email address will not be published. Required fields are marked *