MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */ var script = document.createElement('script'); script.setAttribute('type', 'text/javascript'); script.setAttribute('src', '/index.php?title=MediaWiki:Functions.js&action=raw&ctype=text/javascript&usemsgcache=yes');

importScriptPage('ShowHide/code.js', 'dev');

function rewriteTitle {   if(typeof(window.SKIP_TITLE_REWRITE) != 'undefined' && window.SKIP_TITLE_REWRITE) return;

var titleDiv = document.getElementById('title-meta');

if(titleDiv == null) return;

var cloneNode = titleDiv.cloneNode(true); var firstHeading = getFirstHeading; 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);

/* */

// Inserts user name into (from Uncyclopedia:MediaWiki:Uncyclopedia.js)

addOnloadHook(UserNameReplace); function UserNameReplace { if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace) return; for(var i=0; UserName = document.getElementsByTagName("span")[i]; i++) { if ((document.getElementById('pt-userpage'))&&(UserName.getAttribute('id') == "insertusername")) { UserName.innerHTML = wgUserName; }   } }

//