User:Joritochip/global.js

// goop

$(function {	if ( mw.config.get('skin') !== 'fandomdesktop' || window.QuickBarPageToolsLoaded || !($('#WikiaRail').length) ) return;	window.QuickBarPageToolsLoaded = true; 	var bar_toggle = $(' Page tools').appendTo($('#WikiaBar .tools')),		bar_list = $('').appendTo(bar_toggle);	function awaitRail {		var rail = $('#WikiaRail');		return new Promise(function(resolve) { var observer = new MutationObserver(function {				if (rail.hasClass('is-ready')) {					resolve;					observer.disconnect;				}			}); observer.observe(rail[0], {				attributes: true,				attributeFilter: ['class']			}); });	}	function observeTools {		var list = $('#page-tools-module .rail-module__list');		if (list.length) {			list.children.appendTo(bar_list);			new MutationObserver(function { list.children.appendTo(bar_list); }).observe(list[0], { childList: true });		}	}	awaitRail.then(observeTools);	mw.util.addCSS('#page-tools-module {display:none}li.pagetools:hover #page-tools-menu {display:block}li.pagetools:hover svg {transform:rotate(180deg)}'); });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:AjaxDelete/code.js',        'u:dev:MediaWiki:AjaxRC.js',        //'u:dev:MediaWiki:CollapsiblePageTools.js',        'u:dev:MediaWiki:DupImageList/code.js',        //'u:dev:MediaWiki:QuickBarPageTools.js',        'u:dev:MediaWiki:MassCategorization/code.js',        'u:dev:MediaWiki:SmoothGlobalNav/code.js',        'u:dev:MediaWiki:ThemeToggler.js',        'u:dev:MediaWiki:UTCClock/code.js',        'u:dev:MediaWiki:WHAM/code.2.js',        'u:dev:MediaWiki:Wikimarks/code.js',    ] }); importScriptPage('User:Joritochip/common.js', 'joritochip'); // CategorizedNotifications importScriptPage('User:Joritochip/NoGlobalNav.js', 'developer'); // NoGlobalNav

/* Simplify Fan Feed */ if ($('#mixed-content-footer').length) { var interval; interval = setInterval(function {		if ($('#mixed-content-footer .mcf-card-article__link').length) {			clearInterval(interval);			$('#mixed-content-footer .mcf-column > *:not(.mcf-card-article__link), #mixed-content-footer .mcf-card-article__subtitle').remove;           $('#mixed-content-footer .mcf-card-article[data-li-type!="wiki"]').parent.remove;			var mosaic = $('#mixed-content-footer .mcf-mosaic');			var cards = $('#mixed-content-footer .mcf-card-article__link');			cards.slice(0, 8).css({width: '12%'}).appendTo(mosaic);			$('#mixed-content-footer .mcf-card-article').css({height: 'auto', aspectRatio: '1 / 1'});			$('#mixed-content-footer .mcf-column').remove;			$('#mixed-content-footer .mcf-header').text('Other Articles');			$('#mixed-content-footer .mcf-card-article__title').css({fontSize: '14px', padding: '0 10px', overflow: 'hidden'});		}	}, 100); }