Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
if(mw.config.get('wgNamespaceNumber')==10){// Only if we're in Template: space// Grab main page tabvarsandtabMainTab=$('#left-navigation li:not(.selected)').slice(0,1).css('opacity','0.9');// Clone main page tabvarsandtabTab=sandtabMainTab.clone(true).attr('id',sandtabMainTab.attr('id')+'-').css('opacity','0.9').removeClass('new');// Construct URLvarsandtabURL='http://'+wgPageContentLanguage+'.'+wgNoticeProject+'.org/w/index.php?title='+wgPageName+'/sandbox';// Set sandbox tab URL, text, and title sandtabTab.find('a').attr('href',sandtabURL).empty().text('Sandbox').attr('title',"Navigate to this page's sandbox");// Get sandbox existence status via Ajax$.ajax({url:"http://en.wikipedia.org/w/api.php?action=query&titles="+encodeURIComponent(wgPageName+'/sandbox')+"&format=xml",dataType:"xml",type:"GET",success:parseIt});sandtabTab.insertBefore($('#right-navigation li').slice(0,1));}// Ajax function on data return: If 'missing' field is defined, page is missing, so add 'new' class to tab, which turns it redfunctionparseIt(xml){varmissing=$(xml).find('page').attr('missing');if(typeofmissing!="undefined")sandtabTab.addClass('new');}