User:01miki10/global.js

window.nullEditDelay = 1500; window.qtUserPageTemplate = ''; window.qtEnableUserPageOverwrite = true; mw.loader.load( 'https://dev.fandom.com/load.php?mode=articles&articles=MediaWiki:WhatLinksHere/code.js|MediaWiki:MassNullEdit/code.js|MediaWiki:NullEditButton/code.js|MediaWiki:NoImageLightbox/code.js|MediaWiki:ThemeToggler.js|MediaWiki:QuickCreateUserPage/code.js&only=scripts' ); // hide permanent theme change button mw.loader.using( 'mediawiki.util', function { mw.util.addCSS( '.page-side-tools .skin-theme-toggle { display: none !important; }' ) } );

/* FandomDesktop-specific stuff */ if( mw.config.get( 'skin' ) == 'fandomdesktop' ) { /* Show categories like they used to be */ $( '.page-footer__categories' ).removeClass( 'wds-is-collapsed' ).css( 'padding-top', '18px' ); $( '.page-footer__categories .wds-collapsible-panel__header' ).remove; $( '#articleCategories .special-categories-label' ).css( 'display', 'block' ); /* Reverse order of global navigation and notifications/profile */ $( '.global-navigation__bottom' ).insertBefore( $( '.global-navigation__top' ) ); $( '.global-navigation__bottom .wds-dropdown__content' ).css( {'top':'46px', 'bottom':'auto'} ); mw.loader.using( 'mediawiki.util', function {		mw.util.addCSS( '.global-navigation .notifications .wds-dropdown.is-attached-to-bottom::before {top:36px; bottom:auto;}' );		mw.util.addCSS( '.global-navigation .notifications .wds-dropdown.is-attached-to-bottom::after {top:36px; bottom:auto;}' );	} ); }

/* change interface to content language */ mw.loader.using( ['mediawiki.api', 'user.options'], function {	var lang = mw.config.get( 'wgContentLanguage' );	if ( lang !== mw.user.options.get( 'language' ) ) {		var api = new mw.Api;		api.saveOption( 'language', lang ).then( console.log( 'Interface language set to ' + lang ) );	} } );

/** * For action=purge to index.php *  change it to POST api.php *  then reload the page * Restores pre-1.28 behavior to MW 1.28+ * Based on meta:User:Glaisher/autoPurge.js, 21 Aug 2016 */ if (( mw.config.get( 'wgAction' ) === 'purge' ) &&	( $.inArray( 'user', mw.config.get( 'wgUserGroups' )) + 1 )) { $.post( mw.config.get( 'wgScriptPath' ) + '/api.php', {		format: 'none',		action: 'purge',		titles: mw.config.get( 'wgPageName' ).replace( /_/g, ' ' )	}, function {		// remove action=purge, but keep the rest		location.replace( location.pathname + location.search .replace( /(?:\?|&)action=purge$/i, '' ) .replace( /(\?|&)action=purge&/i, '$1' ) + location.hash );	} ); }