User

Eivind/monobook.js: Difference between revisions

(New page: addOnloadHook(function () { var tabs = document.getElementById('p-cactions').cloneNode(true); tabs.id = 'mytabs'; var listitems = tabs.getElementsByTagName('LI'); for (i=0;...)
 
(Removing all content from page)
Line 1: Line 1:
addOnloadHook(function () {
 
    var tabs = document.getElementById('p-cactions').cloneNode(true);
    tabs.id = 'mytabs';
    var listitems = tabs.getElementsByTagName('LI');
    for (i=0;i<listitems.length;i++) {
        if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id;
    }
    content = document.getElementById("content");    // Find the content div
    content.parentNode.insertBefore(tabs, content.nextSibling);    // Place tab list right after content div
});

Revision as of 16:25, 15 March 2008