MediaWiki:Gadget-RoleScripts.js

//############################################################## /* ==importArticle pre-script actions== */

// AjaxCommentDelete window.AjaxCommentDeleteConfig = { fastDelete: "Comment Was #|Off Topic/Spam/Vandalism" };

//AjaxBlock window.AjaxBlock = { blockReasons: { 'Spam/Vandalism': 'General Spam/Vandalism', 'Disruptive Editing':'Disruptive Editing', 'Removing Content From Pages': 'Removing Content from Pages', 'Abusing Multiple Accouts (Sockpuppetry)': 'Sockpuppety', 'Vandalism-Only Account': 'VoA Account', 'Inserting False Information': 'Inserting False Information', 'Creating Nonsense/Vandalism Articles': 'Creating Spam Articles', 'Unacceptable username': 'Unacceptable Username', 'Long-Term Abuse': 'Long-Term Abuse', 'Spamming Nonsense Comments': 'Nonsense Comments', 'Shouting': 'Shouting', 'Inserting nonsense/gibberish into pages': 'Inserting nonsense/gibberish into pages', 'Spamming Links to External Sites': 'External Link Spam', 'Personal Attacks': 'Personal Attacks', 'Intimidating Behavior/Harassment': 'Intimidating Behavior/Harassment', 'Edit Warring': 'Edit Warring', 'Intimidating/Harrasing Comments': 'Intimidating/Harrasing Comments', 'Spam/Advertising': 'Spam/Advertising', 'Violation of SkyBlock Rules': 'Violation of SkyBlock Rules', 'Open Proxy/VPN': "Open Proxy/VPN", 'Violation of FANDOM Terms of Use': 'Violation of FANDOM Terms of Use',

},   expiryTimes: { '24 hours': '1 day', '3 days': '3 days', '1 week': '1 week', '2 weeks': '2 weeks', '3 weeks': '3 weeks', '1 month': '1 month', '6 weeks': '6 weeks', '2 months': '2 months', '3 months': '3 months', '4 months': '4 months', '6 months': '6 months', '9 months': '9 months', '1 year': '1 year', '18 months': '18 months', '3 years': '3 years', 'infinite': 'infinite', },   check: { talk: true, autoBlock: true, override: true }, };

//AjaxDelete window.AjaxDelete = { deleteReasons: { 'Advertising': 'Advertising', 'Spam/Vandalism': 'Spam/Vandalism', 'Marked for Deletion': 'Marked for deletion', 'Empty Article': 'Empty Article', 'Author request': 'Author request', 'Irrelevant to The Wiki': 'Irrelevant to the wiki', 'Housekeeping': 'Housekeeping', 'Spam/Vandalism Article': 'Spam/vandalism Article', 'Deprecated/Unused': 'Deprecated/Unused', 'Personal Attack article': 'Personal attack article', 'Disinformation/Hoax': 'Disinformation/Hoax', 'Broken Redirect': 'Broken Redirect', 'Unused Redirect': 'Unused redirect', 'Redirect left from pagemove': 'Page Move redirect', 'Underage (COPPA Regulations)': 'Underage',

},

imageDeleteReasons: { 'Offensive Image': 'Offensive', 'Inappropriate Image': 'Inappropriate', 'Harassment-Only image': 'Harassment', 'Housekeeping': 'Housekeeping', 'Copyright infringement': 'Copyright', 'Author request': 'Author request', 'Duplicate/Superceded File': 'Duplicate/Superceded', 'Improper Image format': 'Improper Format', 'Spam/Vandalism': 'Spam/Vandalism', },   autoCheckWatch: true, noUndelete: false, reload: false, };

// WHAM window.WHAMBlockReason = "vandalism"; window.WHAMDelay = 5; window.WHAMBlockDuration = '3 months'; window.WHAMDeleteReason = "deleting spam/vandalism";

//MassBlock window.massBlockDelay = 5;

// Mass Rename window.massRenameDelay = 5;

// AjaxBatchDelete/Undelete window.batchDeleteDelay = 5; window.batchUnDeleteDelay = 5;

//MassEdit window.MassEditConfig = { interval: 10, placement: { element: "toolbar", type: "append" } };

// FileLinksAutoUpdate LIRoptions = { bottomMessage: '', editSummary: 'Updating file links (automatic)', singleButtonText: 'Rename and update', queueButtonText: 'Add to queue', delay: 10 };

//Nuke window.nukeDelay = 5; window.nukeTitle = "Mass delete all pages created by this user";

//############################################################## /* ==importArticles== */ // Imports scripts from other pages/wikis. mw.loader.using(['mediawiki.api', 'mediawiki.util', 'mediawiki.Uri', 'ext.fandom.ContentReview.legacyLoaders.js']).then(function {   if (window.dontWantRoleSpecificJS) {        return;    }    // This function checks if the user belongs to any of the groups passed in    function userBelongsToGroup {        var groups = Array.from(arguments);        return wgUserGroups.some(function(g){ return groups.includes(g) });    }    // autoconfirmed or above    if(userBelongsToGroup('autoconfirmed', 'rollback', 'content-moderator', 'sysop')) {        importArticles({ type: 'script', articles: [ 'u:dev:MediaWiki:AjaxUndo/code.js', 'u:dev:MediaWiki:AjaxRedirect/code.js', ]       });    }    // rollback or above    if(userBelongsToGroup('rollback', 'content-moderator', 'sysop')) {        importArticles({ type: 'script', articles: [ 'u:dev:MediaWiki:MassRollback.js', 'u:dev:MediaWiki:MassRedirect/code.1.js', 'u:dev:MediaWiki:MassEdit/code.js', 'u:dev:MediaWiki:MassRename/code.js', 'u:dev:MediaWiki:MassCategorization/code.js', 'u:dev:MediaWiki:AnchoredRollback/code.js', ]       });    }    // Content mod or above    if (userBelongsToGroup('content-moderator', 'sysop')) {        importArticles({ type: 'script', articles: [ 'u:dev:MediaWiki:AjaxCommentDelete/code.js', 'u:dev:MediaWiki:MassProtect/code.js', 'u:dev:MediaWiki:ViewDeleted/code.js', 'u:dev:MediaWiki:AjaxBatchUndelete.js', 'u:dev:MediaWiki:AjaxPatrol/code.js', 'u:dev:MediaWiki:FastOldImageDelete/code.js', 'u:dev:MediaWiki:PowerDelete.js', 'u:dev:MediaWiki:MultipleFileDelete/code.js', 'u:dev:MediaWiki:AjaxDelete/code.js', 'u:dev:MediaWiki:Nuke/code.js', 'u:dev:MediaWiki:AjaxBatchDelete.js', 'u:dev:MediaWiki:AjaxThreadDelete/code.js', ]       });    }    // Admin or above    if (userBelongsToGroup('sysop', 'bureaucrat')) {        importArticles({ type: 'script', articles: [ 'u:dev:MediaWiki:MassBlock/code.js', 'u:dev:MediaWiki:AjaxBlock/code.js', 'u:dev:MediaWiki:AdminDashboard JS-Button/code.js', 'u:dev:MediaWiki:AdminDashboard block/code.js', 'u:dev:MediaWiki:AjaxAbuseLog.js', ]       });    } });