User:Densake/global.js

window.CustomTools = [ {		link: 'https://community.fandom.com/wiki/User:Densake/global.css', placement: 'wiki-tools-dropdown', position: -1, text: 'Global CSS' },	{		link: 'https://community.fandom.com/wiki/User:Densake/global.js', placement: 'wiki-tools-dropdown', position: -1, text: 'Global JS' }, ];

importArticles({   type: 'script',    articles: [        /* 'u:dev:MediaWiki:NoGlobalNav.js', */        /* Disables global nav on the left, also uses CSS code, big thing */        'u:dev:MediaWiki:LastEdited/code.js',        /* Displays last edited message at top of page */        'u:dev:MediaWiki:CustomTools.js',        /* Custom tools link: https://dev.fandom.com/wiki/CustomTools */        'u:dev:MediaWiki:WebArchive.js',        /* Adds Archive button */    ] }); /* Configuration for Last Edited Module */ window.lastEdited = { avatar: false, size: false, diff: false, comment: false, newpage: false, mainpage: false, time: 'timestamp', };

$(function {	if (mw.config.get('skin') !== 'fandomdesktop' || window.NoGlobalNavLoaded) return;	window.NoGlobalNavLoaded = true;

$('body').addClass('noglobalnav-loaded'); $('.global-navigation__bottom').clone.addClass('user-navigation-moved').removeClass('global-navigation__bottom').appendTo('.wiki-tools.wds-button-group'); $('.user-navigation-moved .notifications').attr('class', 'moved-notifications'); $('.user-navigation-moved .notifications__toggle svg').addClass('wds-icon-small'); $('.user-navigation-moved .notifications__counter').attr('class', 'moved-notifications__counter'); $('.user-navigation-moved .moved-notifications .wds-dropdown__content').remove; $('.user-navigation-moved .moved-notifications .wds-dropdown').attr('class', ''); $('.user-navigation-moved .wds-dropdown .wds-open-to-right').removeClass('wds-open-to-right'); $('.user-navigation-moved .wds-dropdown .wds-dropdown__content').addClass('wds-is-right-aligned'); $('.user-navigation-moved .moved-notifications .global-navigation__icon').click(function(e) {		e.stopPropagation;		$('.global-navigation .notifications .global-navigation__icon').click;	}); /* Propagate unread notification count to cloned counters */ var counter = $('.global-navigation .notifications__counter'); if (counter.text) { $('.user-navigation-moved .moved-notifications__counter').text(counter.text); } else { new MutationObserver(function(n, observer) {			var text = counter.text;			if (text) {				$('.user-navigation-moved .moved-notifications__counter').text(text);				observer.disconnect;			}		}).observe(counter[0], {			childList: true		}); } });