MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

if ((wgAction == "edit" || wgAction == "submit") && mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images3.wikia.nocookie.net/coasterpedia/images/4/41/RainbowButton.png", "speedTip": "Insert Pokémon", "tagOpen": "Pokémon", "tagClose": "", "sampleText": ""}; } if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/central/images/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT ",    "tagClose": "", "sampleText": "Insert text"}; }

/** 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);