MediaWiki:Monobook.js: Difference between revisions

From Wiki³
(Created page with "→‎Any JavaScript here will be loaded for users using the MonoBook skin: →‎Move top tabs inside body content: addOnloadHook(function () { content = document.getEleme...")
 
No edit summary
Line 11: Line 11:
     tabs = document.getElementById("p-cactions");  // Find the top tab list
     tabs = document.getElementById("p-cactions");  // Find the top tab list
     tabs.parentNode.removeChild(tabs);    // Remove the tab list from the side column
     tabs.parentNode.removeChild(tabs);    // Remove the tab list from the side column
     content.insertBefore(tabs,content.firstChild);    // Place tab list at the beginning of the content column
     content.insertBefore(tabs,parent.content);    // Place tab list at the beginning of the content column
});
});

Revision as of 15:36, 7 February 2012

/* Any JavaScript here will be loaded for users using the MonoBook skin */

/* Move top tabs inside body content */
addOnloadHook(function () {
    content = document.getElementById("column-content");    // Find the main content column

    footer = document.getElementById("footer");  // Find the footer
    footer.parentNode.removeChild(footer);    // Remove the footer from the global wrapper
    content.appendChild(footer);    // Place footer at the end of the content column;

    tabs = document.getElementById("p-cactions");   // Find the top tab list
    tabs.parentNode.removeChild(tabs);    // Remove the tab list from the side column
    content.insertBefore(tabs,parent.content);    // Place tab list at the beginning of the content column
});