Just played around with Greasemonkey

I'm not a javascript expert, but just played around using js in greasemonkey, quite funny.

// ==UserScript==
// @name FilterGuruEntry
// @description Filter Guru Entry
// @include http://www.guru.com/pro/search_results.cfm*
// ==/UserScript==


var allTRs, thisTR;
allTRs = document.getElementsByTagName('SPAN');
for (var i = 0; i < allTRs.length; i++) {

thisTR = allTRs[i];

if (thisTR.getAttribute("class") == "btblue") {

//myTBODY = thisTR.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
myTR = thisTR.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
myTD = thisTR.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;

if (myTR.nodeName == "TR") {
//myTR.removeChild(myTD);
//myTR.removeChild(myTR.lastChild);
myTR.removeChild(myTD);

}

//myTBODY.removeChild(myTR);
}
}

Comments

Popular posts from this blog

Java encoding : UTF-8, Big5, x-MS950-HKSCS