MediaWiki:Common.js

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

/* Auto Refresh */ AjaxRCRefreshText = 'Auto-refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; ajaxPages = ["Special:RecentChanges","Special:WikiActivity"]; importScriptPage('AjaxRC/code.js', 'dev');

/* Back To Top */ importScriptPage('BackToTopButton/code.js', 'dev'); /* FloatingToc */ importScript('MediaWiki:FloatingToc.js');

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

/* Inactive Users */ InactiveUsers = {months: 3}; importScriptPage('InactiveUsers/code.js', 'dev'); /* Anonymous IP */ importScriptPage('RevealAnonIP/code.js', 'dev');

/* RefreshButton */ PurgeButtonText = 'Refresh'; importScriptPage('PurgeButton/code.js', 'dev');

// BEGINNING: JavaScript for placing the fair use rationale template inside the summary box on Special:Upload. Code by "wikipedia:User:Pinky49", created and coded specifically for Duty & Valour. function FairUseRationale { if((wgPageName == 'Special:Upload') && document.getElementById('wpDestFile').value == '') { document.getElementById('wpUploadDescription').value = ''; } } addOnloadHook(FairUseRationale); // ****** END: JavaScript for Special:Upload ******

/* Replaces with the name of the user browsing the page. Requires copying Template:USERNAME. */ function UserNameReplace { if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return; $("span.insertusername").text(wgUserName); } addOnloadHook(UserNameReplace); /* End of the replacement */