User:Bookofjude/sandbox 4

Insert this somewhere:

addOnloadHook(function { var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; addlilink(tabs, 'http://en.wikipedia.org/wiki/Special:Prefixindex/' + getPname, 'Subpages'); });

function getPname{ z=document.getElementById("content").childNodes; for (var n=0;n<z.length;n++) { if (z[n].className=="firstHeading") return z[n].textContent; }; }