MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */ // 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 { // check wgCanonicalSpecialPageName for upload page if ( [ 'MultipleUpload', 'Upload' ].indexOf( mw.config.get( 'wgCanonicalSpecialPageName' ) ) > -1 ) { // append Category:USERNAME to upload desc textarea $( '#wpUploadDescription').val( $( '#wpUploadDescription').val + '' ); } } $( 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 */ // window.UserTagsJS = { modules: {}, tags: { // group: { associated tag data }, ADDEPT: { u:'Activities and Development', m:'Activities and Development', f:'Activities and Development' }, GENDEPT: { u:'General Support', m:'General Support', f:'General Support' }, ADMIN: { u:'Administrative Services', m:'Administrative Services', f:'Administrative Services' }, HELPER: { u:'Camp Helper', m:'Camp Helper', f:'Camp Helper' }, RB: { u:'Rollback', m:'Rollback', f:'Rollback' }, CRAT: { u:'Bureaucrat', m:'Bureaucrat', f:'Bureaucrat' } } }; UserTagsJS.modules.custom = { // activities and development department 'Brocky292': ['ADDEPT', 'CRAT'], // Add Activities and development tags 'EvilhariboMadness': ['ADDEPT'], 'LyreOfOrpheHyus': ['ADDEPT'], 'Royaldoggie': ['ADDEPT'], // General Support department 'Hydrocarbon1997': ['GENDEPT', 'CRAT'], // Add General support tags 'TheWondefulMaskedMadame': ['GENDEPT'], 'DaMigster': ['GENDEPT', 'RB'], 'Windsword7': ['GENDEPT', 'RB'], 'LeGruff': ['GENDEPT', 'RB'], // Administrative Services department 'Demi-hunter13': ['ADMIN', 'CRAT'], // Add Administrative services tags 'Bird of Winter': ['ADMIN'], 'Kevin Mo': ['ADMIN'], 'Waves Of Wisdom': ['ADMIN'], 'Broken fire': ['ADMIN', 'RB'], 'Katniss0019': ['ADMIN', 'RB'],

// Camp Helpers tag 'DrXax': ['HELPER'], 'HiddenRealm': ['HELPER'], 'Justiee.': ['HELPER'], 'TheOrbitingStars': ['HELPER'], }; // 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'] });

/* IRClogin div */ $(function {   if ($('#IRClogin').length) {        if (typeof wgUserName == 'undefined') {            var nick = 'wgusername' + Math.floor(Math.random * 100);        } else {            var nick = wgUserName.replace(/ /g, "_");        }        $('#IRClogin').html(' ');    } });