Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Forum:Easy switching between monobook, wikia and wikiamobile

The Cloisters
IndexTech notes → Easy switching between monobook, wikia and wikiamobile
Spoilers are strongly policed here.
If this thread's title doesn't specify it's spoilery, don't bring any up.

If you mostly use Monobook, it's very important that you check out how your edits look in Oasis/Wikia. This is because Oasis/Wikia is the way that the vast majority of users see the site.

When you're checking out the site anonymously — which most people do — then you have no choice in the matter. You will be using Oasis.

It's also vital that we occasionally check how our pages are looking in the Wikiamobile skin for Android, iOS and other handheld devices.

But it can be a pain changing between the skins if you have to go through Special:Preferences. Heck, you can't even get to Wikiamobile through preferences. Fortunately you don't have to do that. Just follow these simple instructions, and you'll soon have a nifty little button that you can press to instantly look at the page in Wikia or Wikiamobile, without leaving Monobook.

  1. Click here.
  2. Edit the page (it may be a new page for you, in which case you'll need to create it, rather than edit it.)
  3. Copy and paste the following text:
// Skin Switch Button for monobook to oasis and vice versa
// and for monobook and oasis to wikiamobile

$( function () {
	if ( !document.getElementById( 'ca-skins' ) ) {
		if ( skin === 'oasis' || skin === 'wikia' ) {
			$( '<li id="ca-skins"><a href="/index.php?title=' + encodeURIComponent( wgPageName ) + '&useskin=monobook">MB</a></li>' ).appendTo( '#AccountNavigation' ); $( '<li id="ca-skins"><a href="/index.php?title=' + encodeURIComponent( wgPageName ) + '&useskin=wikiamobile">WM</a></li>' ).appendTo( '#AccountNavigation' );
		} else {
			$( '<li id="ca-skins"><a href="/index.php?title=' + encodeURIComponent( wgPageName ) + '&useskin=wikia">Oasis</a></li>' ).appendTo( '#p-cactions > .pBody > ul' ); $( '<li id="ca-skins"><a href="/index.php?title=' + encodeURIComponent( wgPageName ) + '&useskin=wikiamobile">Mobile</a></li>' ).appendTo( '#p-cactions > .pBody > ul' );
		} 
	}
} );

Save the page, and you're done!

If you're in Oasis, you'll now have a lovely little button labelled "MB" to the right of your name in the blue bar at the top of every page. Click that, and you'll instantly see the page in Monobook.

If you're in Monobook, you'll now have a tab that says "oasis". Click it, and you'll instantly see the page in the Oasis skin.

Cool, huh?
czechout<staff />   22:50: Wed 11 Apr 2012 

Note that if you have a particularly long user name, this may "scrunch up" your top bar a bit. If so, let me know, and I can give you some alternate places to attach the button.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.