Community Central
Community Central
(Copying Global User JS & CSS to community.fandom.com." . " Global User JS & CSS will be loaded from community.fandom.com with the next release.)
mNo edit summary
Line 27: Line 27:
 
'u:dev:MediaWiki:RemoveLegacyThreads.js'
 
'u:dev:MediaWiki:RemoveLegacyThreads.js'
 
]
 
]
  +
});
  +
  +
mw.loader.using('mediawiki.api').then(function(){
  +
if (mw.config.get('wgWikiaEnvironment') !== "sandbox") return;
  +
if (mw.config.get('skin') === "fandomdesktop") return;
  +
new mw.Api().saveOption('skin','fandomdesktop').then(function() {
  +
location.reload();
  +
});
 
});
 
});

Revision as of 17:57, 5 May 2021

$(function() {
	$('#wpAutoApproved').prop('checked',true);
});

 /* Change RecentChanges layout to not-ugly */
 /* Remove if https://phabricator.wikimedia.org/T202916 ever gets fixed */
mw.loader.using("mediawiki.user", function() {
	if ( mw.user.options.get('usenewrc') !== 0 ) {
		mw.loader.load("mediawiki.notify");
		( new mw.Api() ).postWithToken( 'options', {
			action: "options",
			change: "usenewrc=0"
		} ).done( function() {
			mw.loader.using("mediawiki.notify", function(){
				mw.notify( "RecentChanges formatting has been reset.  You may need to change the URL to remove 'enhanced=1'." );
			} );
		} );
	} else {
		console.log('RecentChanges formatting was not ugly this time');
	}
} );

importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:MassRename/code.js',
        'u:dev:MediaWiki:RemoveLegacyThreads.js'
    ]
});

mw.loader.using('mediawiki.api').then(function(){
	if (mw.config.get('wgWikiaEnvironment') !== "sandbox") return;
	if (mw.config.get('skin') === "fandomdesktop") return;
	new mw.Api().saveOption('skin','fandomdesktop').then(function() {
		location.reload();	
	});
});