User:GaKo/fandomdesktop.js

function RecipeLevel (multiply) { // If we ever use this gadget outside of the "main" namespace then we don't want to precede the name of the page with a ':' // So if current namespace number is 0 (i.e. main) then add a ':' before the pageName, otherwise don't	var includePage = mw.config.get('wgNamespaceNumber') === 0 ? ':' + mw.config.get('wgPageName') : mw.config.get('wgPageName'); var text = ""; var api = new mw.Api; api.get({		action : "parse",		title: mw.config.get('wgPageName'),		text : text,		prop : "text"	}).then(function(data){		var result = data.parse.text['*'];		var $container = $("#mw-content-text .mw-parser-output .mw-parser-output");		$container.html(result);	}); }

$("button#first").click(function {	$("button").removeClass("tab-head-active");	$(this).addClass("tab-head-active"); });

$("button#second").click(function {	$("button").removeClass("tab-head-active");	$(this).addClass("tab-head-active"); });

$("button#third").click(function {	$("button").removeClass("tab-head-active");	$(this).addClass("tab-head-active"); });

$("button#fourth").click(function {	$("button").removeClass("tab-head-active");	$(this).addClass("tab-head-active"); });

$("button#fifth").click(function {	$("button").removeClass("tab-head-active");	$(this).addClass("tab-head-active"); });