User:Charitwo-fduser/Title rewrite

/* Rewrites the page's title, used by Template:Title - COPY THIS TO MediaWiki:Common.js */ function rewriteTitle {   if(typeof(SKIP_TITLE_REWRITE) != 'undefined' && SKIP_TITLE_REWRITE) return; var titleDiv = document.getElementById('title-meta'); if(titleDiv == null || titleDiv == undefined) return; var cloneNode = titleDiv.cloneNode(true); var firstHeading = YAHOO.util.Dom.getElementsByClassName('firstHeading', 'h1', document.getElementById('content') )[0]; var node = firstHeading.childNodes[0]; // new, then old! firstHeading.replaceChild(cloneNode, node); cloneNode.style.display = "inline"; var titleAlign = document.getElementById('title-align'); firstHeading.style.textAlign = titleAlign.childNodes[0].nodeValue; } addOnloadHook(rewriteTitle, false);

/* BELOW IS THE TEMPLATE ITSELF - COPY IT TO Template:Title */

Usage examples:
 * removes namespace
 * ''custom title
 * centered
 * aligned to the right
 * etc