MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */ /** Username replace function (Template:USERNAME) ******************************* * Inserts user name into * Originally by Splarka * New version by Spang */  function UserNameReplace { if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return; var n = YAHOO.util.Dom.getElementsByClassName('insertusername', 'span', document.getElementById('bodyContent')); for ( var x in n ) { n[x].innerHTML = wgUserName; } } addOnloadHook(UserNameReplace);