User:Caburum/global.js

// Hello and welcome to my global JS page window.caburum = { // Useful functions for other code below log: function(text) { console.log('%c[CABURUM]', 'color: #00D6D6; background-color: #202124;', text) },	globalNavPage: function(title, page, args) { args = { p: args.p || undefined, r: args.r || undefined, m: args.m || false }		return { text: title, url: mw.util.getUrl(page) + (args.r ? '?' + args.r : ''), isMain: args.m ? true : false, whoIsMain: args.m ? false : args.p, shortName: args.m ? args.m : title }	},	globalNavLink: function(title, url, args) { args = { p: args.p || undefined, m: args.m || false }		return { text: title, url: url, isMain: args.m ? true : false, whoIsMain: args.m ? false : args.p, shortName: args.m ? args.m : title }	} };

window.AutoCreateUserPagesConfig = { content: { 2: '',		3: false, 1202: false },	summary:'Automated new user page' };

// https://dev.fandom.com/wiki/MessageBlock window.MessageBlock = { title : 'Blocked', message : 'You have received a $2 block for the reason: \'$1\'. Unless otherwise stated, you may appeal your block on my message wall at Community Central.', autocheck : true };

// https://dev.fandom.com/wiki/FastDelete window.fdButtons = [ {		summary: 'Housekeeping', label: 'HK' },	{		summary: 'Vandalism', label: 'V'	}, {		summary: 'Spam', label: 'S'	}, {		summary: 'Duplicate', label: 'Dp' } ];

// https://dev.fandom.com/wiki/FastCreate window.FCButtons = [ /*{		label: 'Create userpage', target: 'User:Caburum', summary: 'Creating userpage', content: '', alwaysDisplay: true, placement: '.wds-global-navigation__user-menu .wds-list' },*/	{		label: 'Create bot userpage', target: 'User:CaburumBot', summary: 'Creating my bot\'s userpage', content: '', alwaysDisplay: true, placement: '.wds-global-navigation__user-menu .wds-list' } ];

// https://dev.fandom.com/wiki/AjaxRename window.AjaxRename = { check: { leaveredirect: false, watch: false, movetalk: true },	renameReasons: { 'Normal': { 'Misnamed': 'Misnamed', 'Better name': 'Better name', 'Capitalization': 'Fixing capitalization' },		'Other': { 'Page does not belong in mainspace': 'Page does not belong in mainspace', }	} };

window.andrewds1021 = { // https://dev.fandom.com/wiki/ViewNotificationsUsers view_notifications_users: { all_types: true, content: 'name' },	// https://dev.fandom.com/wiki/IgnoreNotifications ignore_notifications: { ignore_errors: true, filters: [ {				types: 'discussion-upvote' },			{				wiki_ids: [ 2078067,					2411433,					2417668,					2386902				],				types: 'announcement-target' }		]	} };

// https://dev.fandom.com/wiki/GlobalNavButtons window.globalNavButtons = [ /* Patrolling */ window.caburum.globalNavPage('RC', 'Special:RecentChanges', {m: 'RC'}), window.caburum.globalNavPage('New files', 'Special:NewFiles', {p: 'RC'}), window.caburum.globalNavPage('New pages', 'Special:NewPages', {p: 'RC'}), window.caburum.globalNavPage('New messages', 'Special:SocialActivity', {p: 'RC', r: 'containerTypes=WALL'}), window.caburum.globalNavPage('New comments', 'Special:SocialActivity', {p: 'RC', r: 'containerTypes=ARTICLE_COMMENT'}), /* Social */ window.caburum.globalNavLink('Forum', mw.config.get('wgScriptPath') + '/f', {m: false, p: false}), /* MediaWiki */ window.caburum.globalNavPage('MediaWiki', 'Special:AllPages/MediaWiki:', {m: 'MW'}), window.caburum.globalNavPage('Common CSS', 'MediaWiki:Common.css', {p: 'MW'}), window.caburum.globalNavPage('Wikia CSS', 'MediaWiki:Wikia.css', {p: 'MW'}), window.caburum.globalNavPage('Common JavaScript', 'MediaWiki:Common.js', {p: 'MW'}), window.caburum.globalNavPage('Wikia JavaScript', 'MediaWiki:Wikia.js', {p: 'MW'}), window.caburum.globalNavPage('ImportJS', 'MediaWiki:ImportJS', {p: 'MW'}), window.caburum.globalNavPage('Wiki navigation', 'MediaWiki:Wiki-navigation', {p: 'MW'}), /* Personal */ window.caburum.globalNavLink('ME', 'https://community.fandom.com/wiki/Special:MyPage', {m: 'ME'}), window.caburum.globalNavPage('Local JavaScript', 'Special:MyPage/common.js', {p: 'ME'}), window.caburum.globalNavPage('Local CSS', 'Special:MyPage/common.css', {p: 'ME'}), window.caburum.globalNavLink('Global JavaScript', 'https://community.fandom.com/wiki/Special:MyPage/global.js', {p: 'ME'}), window.caburum.globalNavLink('Global CSS', 'https://community.fandom.com/wiki/Special:MyPage/global.css', {p: 'ME'}), /* Wikis */ window.caburum.globalNavLink('WIKIS', 'https://caburum.fandom.com/wiki/User:Caburum/RecentChanges', {m: 'W'}), window.caburum.globalNavLink('Among Us Wiki', 'https://among-us.fandom.com/wiki/', {p: 'W'}), window.caburum.globalNavLink('Community Central', 'https://community.fandom.com/wiki/', {p: 'W'}), window.caburum.globalNavLink('Dev Wiki', 'https://dev.fandom.com/wiki/', {p: 'W'}), window.caburum.globalNavLink('Discord Wiki', 'https://discord.fandom.com/wiki/', {p: 'W'}), window.caburum.globalNavLink('Test Wiki', 'https://caburum.fandom.com/wiki/', {p: 'W'}), window.caburum.globalNavLink('Customize Your Wiki', 'https://custom.fandom.com/wiki/', {p: 'W'}) ];

if (/sysop|threadmoderator/.test(mw.config.get('wgUserGroups').join)) { window.globalNavButtons.push(		window.caburum.globalNavPage('Message deletion', 'Special:SocialActivity', {p: 'RC', r: 'deleted=true&containerTypes=WALL'}),		window.caburum.globalNavLink('Reported posts', mw.config.get('wgScriptPath') + '/f/reported', {p: 'RC'})	); }

if (mw.config.get('wgNamespaceIds').gadget) { window.globalNavButtons.push(		window.caburum.globalNavPage('Gadgets', 'Special:Gadgets', {p: 'MW'})	); }

// i18n overrides window.dev = window.dev || {}; window.dev.i18n = window.dev.i18n || {}; window.dev.i18n.overrides = window.dev.i18n.overrides || {};

window.dev.i18n.overrides['Rollback'] = window.dev.i18n.overrides['Rollback'] || {}; window.dev.i18n.overrides['Rollback']['summary'] = 'Reverted edits by $1 (talk) to last version by $2';

// Imports importArticles({	type: 'script',	articles: [		// Maintenance		'u:dev:MediaWiki:AjaxBatchDelete.js',		'u:dev:MediaWiki:AjaxRename/ucp.js',		'u:dev:MediaWiki:AjaxTemplate/code.js',		'u:dev:MediaWiki:FastDelete/code.js',		'u:dev:MediaWiki:Rollback/code.js',		'u:dev:MediaWiki:AnchoredRollback/code.js',		'u:dev:MediaWiki:ListFiles/code.js',		'u:dev:MediaWiki:MassNullEdit/code.js',		//Admin		//'u:dev:MediaWiki:AjaxBlock/code.js', // Conflicts with MessageBlock		'u:dev:MediaWiki:MessageBlock/code.js',		'u:dev:MediaWiki:SOAPReport.js',		'u:dev:MediaWiki:WHAM/code.2.js',

// Tools 'u:dev:MediaWiki:QuickDiff/code.js', //'u:dev:MediaWiki:MultiUpload.js', 'u:dev:MediaWiki:UploadMultipleFiles.js', 'u:dev:MediaWiki:LastEdited/code.js', 'u:dev:MediaWiki:FastCreate.js', 'u:dev:MediaWiki:QuickPurge.js', 'u:dev:MediaWiki:CopyTitle.js',

// Personal 'u:dev:MediaWiki:DisplayTimer/code.js', 'u:dev:MediaWiki:AutoCreateUserPages.js', 'u:dev:MediaWiki:GlobalNavButtons.js',

// Social 'u:dev:MediaWiki:ViewNotificationsUsers.js', 'u:dev:MediaWiki:IgnoreNotifications.js', 'u:dev:MediaWiki:UserAndIPTools.js', 'u:dev:MediaWiki:UserAccountAge/code2.js',

// Editing //'u:dev:MediaWiki:DecodeURI/code.js', 'u:dev:MediaWiki:ImageMapEdit.js' ] });

importScriptPage('User:Caburum/MassEdit.js', 'community');

window.caburum.log('Loaded global.js from Community Central');