1 // From my own website(!)
2 //TODO: only do this for links in the table of contents menu
4 function find_selflink() {
5 var a = document.links;
8 if (a[i].href == document.URL) {
11 var s_new = document.createElement("span");
12 s_new.className = "currentlink";
14 for (j=0; j<c.length; j++) {
15 s_new.appendChild(c[j]);
17 a[i].parentNode.replaceChild(s_new, a[i]);
23 if (a[i].href == document.URL) {
24 a[i].className = "currentlink";
26 var s_new = document.createElement("span");
27 s_new.className = "currentlink";
28 s_new.appendChild(a[i]);
29 a[i].parentNode.replaceChild(s_new, a[i]);