User:Cade Calrayn/global.js

// Skin Switch Button for monobook to oasis and vice versa // and for monobook and oasis to mercury

$( function {	if ( skin === 'oasis' || skin === 'wikia' ) {		var accnav = document.getElementById( 'AccountNavigation' );		var dropnav = accnav.getElementsByTagName("ul");		if ( dropnav !== null ) {			var li1 = document.createElement("li");			var a1 = document.createElement("a");			a1.setAttribute('href', "/index.php?title=" + encodeURIComponent( wgPageName ) + "&useskin=monobook");			var text1 = document.createTextNode("Monobook");			a1.appendChild(text1);			li1.appendChild(a1);			dropnav[0].appendChild(li1);			var li2 = document.createElement("li");			var a2 = document.createElement("a");			a2.setAttribute('href', "/wiki/" + encodeURIComponent( wgPageName ) + "?useskin=mercury");			var text2 = document.createTextNode("Mercury");			a2.appendChild(text2);			li2.appendChild(a2);			dropnav[0].appendChild(li2);		}	} if (skin === 'monobook' ) {		$( 'Oasis' ).appendTo( '#p-cactions > .pBody > ul' ); $( 'Mercury' ).appendTo( '#p-cactions > .pBody > ul' ); } } );