HSS Ad Remover

By venj Last update Mar 10, 2008 — Installed 2,831 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 2 posts, 2 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
NanoTech User

Here's an update:

Find:

var adDiv, allDiv;
allDiv = document.getElementsByTagName('div');
var regEx = /^AFc_all[0-9]{1,4}$/;
for (var i = 0; i < allDiv.length; i++) {
    if (regEx.test(allDiv[i].class)) {
        adDiv = allDiv[i];
        adDiv.parentNode.removeChild(adDiv);
    }
}

Replace with:

nodes = document.evaluate("//div", document, null,
    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

for (var i = 0; i < nodes.snapshotLength; i++) {
    thisLink = nodes.snapshotItem(i);
    if(thisLink.className.indexOf('AF') == 0)
        thisLink.parentNode.removeChild(thisLink);
}

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel