Community Central
Community Central
(configuration for ThemeSelector)
m (object name is capitalized)
Line 35: Line 35:
 
 
 
// ThemeSelector
 
// ThemeSelector
window.themeSelector = window.themeSelector || {};
+
window.ThemeSelector = window.ThemeSelector || {};
window.themeSelector.addSticky = true;
+
window.ThemeSelector.addSticky = true;
window.themeSelector.hideBuiltIn = true;
+
window.ThemeSelector.hideBuiltIn = true;
   
 
window.myImports = [
 
window.myImports = [

Revision as of 23:26, 22 July 2021

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;

window.myImports = [

        // Additional actions
        'u:dev:MediaWiki:View_Source/code.js',
        'u:dev:MediaWiki:WhatLinksHere/code.js',
        'u:dev:MediaWiki:PurgeButton/code.js',
        'u:dev:MediaWiki:NullEditButton/code.js',
        'u:dev:MediaWiki:SkinSwitchFD.js',           // toggling skin
        'u:dev:MediaWiki:ThemeSelector.js',           // toggling themes

		'u:dev:MediaWiki:MultipleActivity.js',
		'u:dev:MediaWiki:Bang.js',
        'u:dev:MediaWiki:UserAccountAge/code2.js',
        'u:dev:MediaWiki:OrganizedSocialActivity.js',
        'u:dev:MediaWiki:ViewNotificationsUsers.js',
        'u:dev:MediaWiki:MassEdit/code.js',
        'u:dev:MediaWiki:PortableCSSPad/code.js',
        'u:dev:MediaWiki:ThemeStyle/code.js',
        
        // Marked as unmaintained but works
        'u:dev:MediaWiki:Wikimarks/code.js',
    ];

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

importScriptPage('User:HumansCanWinElves/testing.js', 'dev');
importArticles({
    type: 'script',
    articles: window.myImports
});