User:Syde BOT/global.js

// 04:28, April 19, 2019 (UTC) // 

// EDIT INTRO BUTTON importScriptPage('EditIntroButton/code.js', 'dev'); // END INTRO BUTTON // AUTO-REFRESH RECENT CHANGES AND WIKI-ACTIVITY AjaxRCRefreshText = 'Auto-refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; ajaxPages = ["Special:RecentChanges", "Special:WikiActivity"]; importScriptPage('AjaxRC/code.js', 'dev'); // END AUTO-REFRESH // REFRESH DROP-DOWN MENU OPTION importScriptPage('PurgeButton/code.js', 'dev'); // END REFRESH BUTTON // The options need to be set before the import! Otherwise they may not work. importArticles({	type:'script',	articles: [		// ...		'w:c:dev:UserTags/code.js',		// ...	] }); window.UserTagsJS = { modules: {}, tags: { assistant: 'Assistant', threadmoderator: 'Discussion Moderator', 'content-moderator': 'Content Moderator' },	oasisPlaceBefore: '' }; importArticle({type:'script', article:'w:c:dev:UserTags/code.js'}); UserTagsJS.modules.inactive = 62; UserTagsJS.modules.newuser = true; UserTagsJS.modules.autoconfirmed = true; UserTagsJS.modules.mwGroups = ['bureaucrat', 'sysop', 'assistant', 'rollback', 'chatmoderator', 'bannedfromchat', 'global-discussions-moderator']; /* HideRail */ importScriptPage('HideRail/code.js', 'dev');

importArticles({   type: 'script',    articles: [         'u:dev:ExpandGlobalNavDropdownsOnHover/code.js',         'u:dev:WorkingMoreUsersCount.js',         'u:dev:FindAndReplace/code.js',         'u:dev:CategoryRenameAuto-update/code.js',         'u:dev:EditBio/code.js',         'u:dev:MediaWiki:DisableDrafts.js',    ] });

// Adds NavigationPopups // wikipedia:User:Lupin/popups popupRevertSummary = 'Revert to revision dated %s by %s, oldid %s using popups'; popupQueriedRevertSummary = 'Revert to revision $1 dated $2 by $3 using popups'; popupExtendedRevertSummary = 'Revert to revision dated %s by %s, oldid %s using popups'; popupQueriedRevertToPreviousSummary = 'Revert to the revision prior to revision $1 dated $2 by $3 using popups'; popupRevertToPreviousSummary = 'Revert to the revision prior to revision %s using popups'; popupRevertSummaryPrompt = true; popupStructure = 'menus'; popupFixDabs = 'true'; popupFixDabsSummary = 'Disambiguate %s to %s using popups'; popupRmDabLinkSummary = 'Remove link to dab page %s using popups'; mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/javascript&oldid=805750784"); importStylesheetURI('https://en.wikipedia.org/w/index.php?action=raw&ctype=text/css&title=MediaWiki:Gadget-navpop.css'); // END Adds NavigationPopups

window.colour = {}; /** Mass-PM block script created by Colouratura. * colour.chat * * Literally exists to hold PM blocking code */ window.colour.chat = { _blockPM: function(user) { return new Promise(function(resolve, reject) {           $.ajax({ url: mw.util.wikiScript('index') + '?action=ajax&rs=ChatAjax&method=blockOrBanChat', type: 'post', dataType: 'json', data: { userToBan: user, dir: 'add', token: mw.user.tokens.get('editToken') }               })                .done(function(res) { if (!res.hasOwnProperty('success')) reject(res); if (res.success === true) resolve(true); else reject(res); })               .fail(function(err, stat) { reject(err, stat); });       });    },    blockPM: function(user) { window.colour.chat._blockPM(user).then(           function {                console.log(user + ' was blocked!');            },            function(err, stat) {                console.error(err, stats);            }        ); } }; /** * Blocks PMs on user join * * This is a bot account, no need to PM it. */ if (mw.config.get('wgCanonicalSpecialPageName') === 'Chat') { mainRoom.socket.bind('join', function(event) {       var ev = JSON.parse(event.data);        var username = ev.attrs.name;        var whitelist = [            'C.Syde65',        ];        if (!whitelist.includes(username))            colour.chat.blockPM(username);    }); }

massProtectDelay = 500; importArticles({   type: "script",    articles: [        'u:dev:MassProtect/code.js',    ] }); if (mw.config.get("wgUserGroups").indexOf('sysop') > -1) { massCategorizationDelay = 500; importScriptPage('MediaWiki:MassCategorization/code.js', 'dev'); } window.massEditConfig = { editSummary: "Your edit summary", editInterval: 1000 };