User:Westgrass/common.js

$(function{   if( !$('body.skin-fandomdesktop').length ){        return;    }	if("ontouchstart" in window){ // only when this is not registered in common.js		return; 	}	$('.fandom-sticky-header').remove;	//move gp logo to top bar	$('.fandom-community-header__top-container').appendTo($('.global-navigation__top'));	//move wiki tools to aside	$('.wiki-tools').first.find('a').appendTo($('.fandom-community-header__local-navigation .extra-large-navigation>:first-child .wds-list')).wrap('');

//move page tools to aside $("#WikiaRail").on("afterLoad.rail", function{		var $pageTools = $('#p-tb');		if(!$pageTools.length){			return;		}		var $t = $(' '+$pageTools.find('h2').text+'   ');		$t.find("div.wds-dropdown__content").append($pageTools.find('ul').clone.removeClass.addClass('wds-list wds-is-linked'));		var $f = $('.fandom-community-header__local-navigation .extra-large-navigation .page-footer__languages');		if($f.length){			$t.insertBefore($f);		}		else{			$t.appendTo($('.fandom-community-header__local-navigation .extra-large-navigation'));		}	}); //move language to aside: var $l = $('.page-footer__languages').removeClass('wds-collapsible-panel').addClass('wds-dropdown').appendTo($('.fandom-community-header__local-navigation .extra-large-navigation')) var $h = $l.find('.wds-collapsible-panel__header').removeClass.addClass('wds-dropdown__toggle first-level-item'); $h.find('svg').remove; $h.append($(' ')); $l.find('.wds-collapsible-panel__content').removeClass.addClass('wds-dropdown__content').find('a').wrap(''); $l.find('.wds-dropdown__content li').wrapAll('');

//local nav dropdown lists workaround: $(".fandom-community-header__local-navigation").on("click", ".wds-dropdown__content .wds-list.wds-is-linked .wds-dropdown-level-2", function(event){		$(this).toggleClass("expanded");		event.preventDefault;		event.stopPropagation;	}); $(".fandom-community-header__local-navigation").on("click", ".wds-dropdown__content .wds-list.wds-is-linked .wds-dropdown-level-2 > div", function(event){		event.stopPropagation;	}); $(".fandom-community-header__local-navigation").on("click", '.wds-dropdown__toggle.first-level-item', function(event){		event.stopPropagation;		$(this).closest('.wds-dropdown').toggleClass('collapsed');	});

});