User:HumansCanWinElves/global.js

debugger; console.log(mw); var URLparams = new URLSearchParams(window.location.search), myDebug = URLparams.get('myDebug') === '1', config = mw.config.get;

/* Possibly to cookbook if (myDebug) { var mediaReplacer = mw.config.get('wgTimedMediaHandler'); mediaReplacer['EmbedPlayer.RewriteSelector'] = mediaReplacer['EmbedPlayer.RewriteSelector'].replace('audio,', ''); }

// I want to make certain scripts think that I have certain user rights. Of // course, that won't allow me to actually perform actions I don't have rights // for... mw.config.set('wgUserGroups', config.wgUserGroups.concat( ['sysop', 'bot']));

// *** Script configuration *** // ViewNotificationsUser window.andrewds1021 = window.andrewds1021 || {}; window.andrewds1021.view_notifications_users = window.andrewds1021.view_notifications_users || {}; window.andrewds1021.view_notifications_users.all_types = true; window.andrewds1021.view_notifications_users.limit = 50; window.andrewds1021.view_notifications_users.content = "name"; if (URLparams.get('notifList') !== 'full') { window.andrewds1021.get_on_site_notifications = { default_count: 5 };	}

// MassEdit window.MassEditConfig = { interval: 2500, placement: { element: "toolbar", type: "append" }	};	// ThemeSelector window.ThemeSelector = window.ThemeSelector || {}; window.ThemeSelector.addSticky = true; window.ThemeSelector.hideBuiltIn = true;

window.myImports = [

// Additional actions 'View_Source/code', 'WhatLinksHere/code', 'PurgeButton/code', 'NullEditButton/code', 'ThemeSelector', // Enhancing user experience 'Bang', 'OrganizedSocialActivity', 'Wikimarks/code', // Displaying information 'MultipleActivity', 'UserAccountAge/code2', 'ViewNotificationsUsers', // Utils 'PortableCSSPad/code', 'DoruDev', 'MassEdit/code', ].map(function(a, b) {   	return 'u:dev:MediaWiki:' + a + '.js'    });

importArticles({   type: 'script',    articles: window.myImports });

if (myDebug) { // load the unreviewed revision. Only works when on test mode mw.loader.getScript('https://dev.fandom.com/wiki/MediaWiki:OrganizedSocialActivity.js'	   	+ '?action=raw&ctype=text/javascript&only=scripts'); }

mw.loader.load('https://dev.fandom.com/wiki/User:HumansCanWinElves/testing.js' +				'?action=raw&ctype=text/javascript');

// Use the link added by UserAccountAge to view additional user information $('.page__main').one('click', '#userAccountAge-a', function {   this.href = this.href.replace( '&usprop=registration', '&usprop=groups|registration'); });

// View page details when clicking the heading $('#firstHeading').one('click', function { importArticles({ type: 'script', articles: [ 'u:dev:MediaWiki:PageCreator/code2.js', 'u:dev:MediaWiki:LastEdited/code.js', ] }) });