User:HumansCanWinElves/global.js

if (mw.config.get('wgServer') === 'https://lost-cities-keeper.fandom.com') { var themeSheet = document.createElement('link'), themeURL = "/wikia.php?controller=ThemeApi&method=themeVariables&variant=dark"; themeSheet.rel = "stylesheet"; themeSheet.href = themeURL; document.head.appendChild(themeSheet); }

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

// I want to make certain script 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;

var dev = 'u:dev:MediaWiki:'; window.myImports = [

// Additional actions dev + 'View_Source/code.js', dev + 'WhatLinksHere/code.js', dev + 'PurgeButton/code.js', dev + 'NullEditButton/code.js', dev + 'SkinSwitchFD.js',          // toggling skin dev + 'ThemeSelector.js',          // toggling themes // Enhancing user experience dev + 'Bang.js', dev + 'OrganizedSocialActivity.js', dev + 'Wikimarks/code.js', // Displaying information dev + 'MultipleActivity.js', dev + 'UserAccountAge/code2.js', dev + 'ViewNotificationsUsers.js', // Utils dev + 'PortableCSSPad/code.js', dev + 'DoruDev.js', dev + 'MassEdit/code.js', ];

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

if (myDebug) { $.getScript('https://dev.fandom.com/wiki/MediaWiki:OrganizedSocialActivity.js'	   	+ '?action=raw&ctype=text/javascript&only=scripts'); }

importScriptPage('User:HumansCanWinElves/testing.js', 'dev');

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