User:Msh210/blocklinks.js

//Seems good for FF; not tested elsewhere. //Many thanks to Splarka for help with this script. function loglink {//link from special:block to log page var t=document.getElementById('mw-bi-target'); if (!t) return; var u=t.getAttribute('value'); if (!u || u=='') return; a=document.createElement('a'); l="/wiki/Special:Log?user="+u; a.setAttribute('href',l); x='Logs for '+u; a.appendChild(document.createTextNode(x)); p=getElementsByClassName(document,'p','mw-ipb-conveniencelinks'); if (p.length!=1) {//just in case they change the name or something t.parentNode.insertBefore(a,t) } else { s=document.createTextNode(' | '); o=p[0].childNodes[0]; p[0].insertBefore(s,o); o=p[0].childNodes[0];//s p[0].insertBefore(a,o); }//end else } if (wgNamespaceNumber == -1 && wgCanonicalSpecialPageName == 'Block') addOnloadHook(loglink);