User:Twigboy/monobook.js

function externISBN { for (var i = 0; i < document.links.length; i++) {               var ln = document.links[i].href.match(/isbn=(.*)/); if (ln) { document.links[i].href='http://www.amazon.com/exec/obidos/ASIN/'+RegExp.$1; }   }

}

addOnloadHook(externISBN);

// Script to footnote text to the tooltips on footnote links addOnloadHook(function refTooltips {   var linkElem, linkHref, noteElem;    // Get list of footnote links (they all have class: 'reference')    var refElems = getElementsByClassName(document.body, "SUP", "reference");    for(var i = 0; i < refElems.length; i++)    {        if(linkElem = refElems[i].getElementsByTagName("a")[0])        {            linkHref = linkElem.href;            // Get footnote id from link href and add text content to link tooltip            if(noteElem = document.getElementById(linkHref.substr(linkHref.indexOf("#") + 1)))                linkElem.title = noteElem.innerText || noteElem.textContent || "";        }    } });