Jump to content

User:DatRoot/myskin.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by DatRoot (talk | contribs) at 20:01, 29 October 2007. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
addOnloadHook(
    function () {
        var contentElem = document.getElementById("content");

        var pageLinksElem = document.createElement("div");
        pageLinksElem.id = "pageLinks";
        contentElem.appendChild(pageLinksElem);
        moveListItems(document.getElementById("p-tb"), pageLinksElem);
    }
);

function moveListItems(list, newParent)
{
    var listElem = list.childNodes[1].childNodes[0];
    for(var i = 0; i < listElem.childNodes.length; i++) 
    {
        var listItem = listElem.childNodes[i];
        listItem.tagName = "span";
        newParent.appendChild(listItem);
    }
}