User:Msh210/sulutil.js

//essentially copied from User:Msh210/blocklinks.js; many thanks to Splarka for help with the latter function sulutil {//link from user's log to SUL util var t=document.getElementById('mw-log-user'); if (!t) return; var u=t.getAttribute('value'); if (!u || u=='') return; a=document.createElement('a'); l="http://toolserver.org/~vvv/sulutil.php?user="+u; a.setAttribute('href',l); x='sulutil:'+u; a.appendChild(document.createTextNode(x)); s=t.parentNode;//span z=s.parentNode; z.insertBefore(a,s); p=document.createTextNode(' '); z.insertBefore(p,s); } if (wgNamespaceNumber == -1 && wgCanonicalSpecialPageName == 'Log') addOnloadHook(sulutil);