Greasemonkey user script: Experts Exchange

Posted: December 25th, 2009 | Author: | Filed under: Greasemonkey scripts, Javascript | Tags: | No Comments »

For those of you who doesn’t know, experts-exchange.com usually charges money for viewing solutions, but if you come from Google search results you can view them for free (my guess is they wanted the text in the answers to get indexed, in order to get extra traffic from search keywords that only appear in the answers and not in the questions. showing the answers only to Google bot would be considered cloaking and harm the user experience, so they do it in order to avoid getting banned from Google).

The only problem is that they show the answers after a long long long list of categories, and you have to scroll down a lot in order to see them.

I wrote a small (3 lines) greasemonkey script to remove all the junk and make it more usable by hiding the categories list, the fake hidden answers and let you see the content you really want to see:

Download / Install / View source

You need to be using Firefox and have the Greasemonkey extension installed (direct link to .xpi file) to use this.

The code is those 3 lines:

var ans = document.getElementsByClassName('answers');
ans[0].parentNode.replaceChild(ans[1],ans[0]);
for (var c in {'squareSignUp':1,'qStats':1,'relatedSolutions':1,'allZonesMain':1,'lightImage':1})document.getElementsByClassName(c)[0].parentNode.removeChild(document.getElementsByClassName(c)[0]);

Simple and quite useful.