MediaWiki:Common.js

/* Makes username template work */ function userNameReplace { "use strict"; var disableUsernameReplace; if (disableUsernameReplace || mw.config.get('wgUserName') === null) { return; }   $("span.insertusername").html(mw.config.get('wgUserName')); } addOnloadHook(userNameReplace); /* User Tags */ window.UserTagsJS = { tags: { bureaucrat: { link: 'Special:ListUsers/bureaucrat' },       bot: { link: 'Special:Listusers/bot' },       chatmoderator: { link: 'Special:ListUsers/chatmoderator' },       patroller: { link: 'Special:ListUsers/patroller' },       imagecontrol: { u: 'imagecontrol', link: 'Special:ListUsers/imagecontrol' },       rollback: { link: 'Special:ListUsers/rollback' },       sysop: { link: 'Special:ListUsers/sysop' }   },    modules: { autoconfirmed: true, inactive: { days: 60, namespaces: [0], zeroIsInactive: true },       mwGroups: [ 'bannedfromchat', 'bureaucrat', 'chatmoderator', 'sysop', 'rollback', 'patroller', 'bot', 'imagecontrol' ],       newuser: true } }; // Change title $(function {    "use strict";    var newTitle = $('#title-meta').html,        edits = $('#user_masthead_since').text;    if (!newTitle) {        return;    }    $('.firstHeading, #WikiaUserPagesHeader h1, #WikiaPageHeader h1').html(newTitle);    $('.#user_masthead_head h2').html(newTitle + '' + edits + ' '); }); /* LockForums */ window.LockForums = { expiryDays: 15, expiryMessage: "This thread is considered archived because it hasn\'t been commented on in over  days, please don\'t bump this thread!", forumName: "Forum" }; /* MassProtect */ massProtectDelay = 300; //—————————————————————————————— ! ! ! ———————————————————————————————// /* Import scripts. NOTE: Place scripts configurations above this line */ importArticles({   type: 'script',    articles: [        'u:dev:MassProtect/code.js',        //Mass protection.        'u:dev:BackToTopButton/code.js',    //Back to top button.        'u:dev:WallGreetingButton/code.js', //Message walls greetings.         'u:dev:UserTags/code.js',           //Customizes user tags.        'u:dev:SignatureCheck/code.js',     //Talk pages vestige.        'u:dev:ReferencePopups/code.js',    //Allowes to make very neat things :0        'u:dev:PurgeButton/code.js',        //Refresh button.        'u:dev:LockOldBlogs/code.js',       //Automatically locks old blogposts.        'u:dev:FloatingToc/code.js',        //Makes the toc more mobile.        'u:dev:LockForums/code.js',         //Automatically locks old forums.         'u:dev:Countdown/code.js'           //Countdowns.    ] });