MediaWiki:Gadget-revealInterface.js

// By Equazcion: http://terraria.gamepedia.com/User:Equazcion

var wgNamespaceNumber = mw.config.get( 'wgNamespaceNumber' );

var qqxLinkText = 'Reveal Interface'; var qqxLinkTip = 'Reveal MediaWiki interface message names'; var qqxRemLinkText = 'Regular View'; var qqxRemLinkTip = 'Reload this page in regular view (un-reveal MediaWiki interface message names)'; var currHref = window.location.href;

if (wgNamespaceNumber != 8){ if (currHref.indexOf('uselang=qqx') < 0 ) { var qqxToken = (currHref.indexOf('?') < 0 ? '?uselang=qqx' : '&uselang=qqx' ); $('#right-navigation #p-cactions .menu ul').append('' + qqxLinkText + ''); } else { var qqxRem = currHref.replace(/[\?|&]uselang=qqx/,''); $('#right-navigation #p-views ul').prepend(' ' + qqxRemLinkText + ' '); } }