MediaWiki:Common.js

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

// Imports EditIntroButtonText = 'Intro'; importArticles({   type: 'script',    articles: [        'u:dev:Countdown/code.js',        'u:dev:UserTags/code.js',        'u:dev:EditIntroButton/code.js',        'u:dev:FixWantedFiles/code.js',        'u:dev:MiniComplete/code.js',        'u:dev:DupImageList/code.js',        'u:deadisland:User:Jgjake2/js/DISPLAYTITLE.js',        'u:dev:PurgeButton/code.js',        'u:dev:AjaxRC/code.js'] }); var PurgeButtonText = 'Refresh', ajaxPages = ["Special:RecentChanges", "Special:Watchlist", "Special:Log", "Special:Contributions", "Special:WikiActivity", "Blog:Recent_posts"], AjaxRCRefreshText = 'Auto-refresh';

//preload line to add user category for special:upload and special:multipleupload function preloadUploadDesc { if (['special:upload', 'special:multipleupload'].indexOf(wgPageName.toLowerCase) === -1) { return; }

document.getElementById('wpUploadDescription').appendChild(document.createTextNode(""));

} addOnloadHook(preloadUploadDesc);

//edit buttons if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT ",           "tagClose": "", "sampleText": "Insert page" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/c/c9/Button_strike.png", "speedTip": "Strike", "tagOpen": " ", "tagClose": " ", "sampleText": "Strike-through text" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/1/13/Button_enter.png", "speedTip": "Line break", "tagOpen": " ", "tagClose": "", "sampleText": "" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/7/74/Button_comment.png", "speedTip": "Comment visible only for editors", "tagOpen": "", "sampleText": "Insert comment here" }; }

//

/* 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").html(wgUserName); } addOnloadHook(UserNameReplace);

/* End of the replacement */