clearing a link with javascript only works for the first link
<p>Found a bit of javascript that clears the link to current page. So far so good. It worked until there were more than one link.</p>

<pre><code>/*
CLCP v2.1 Clear Links to Current Page
Jonathan Snook
This code is offered unto the public domain
http://www.snook.ca/jonathan/
*/

window.onload = clearCurrentLink;
setTimeout("clearCurrentLink()",50);
function clearCurrentLink(){
    var a = document.getElementsByTagName("A");
    for(var i=0;i&lt;a.length;i++)
        if(a[i].href == window.location.href.split("#")[0])
            removeNode(a[i]);
}

function removeNode(n){
    if(n.hasChildNodes())
        for(var i=0;i&lt;n.childNodes.length;i++)
            n.parentNode.insertBefore(n.childNodes[i].cloneNode(true),n);
    n.parentNode.removeChild(n);
}
</code></pre>

<p>Thing is I can't figure out why it only clears the first link it finds.</p>

<p>I'm generating pages through node / expresss / jade / stylus. Any other ides on how to eliminate links to the current page? </p>

<p>Thanks!</p>
