Community Central
Community Central

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
///////////////////////////////////////////////////////////////////////////////////////////////////////////

// Wikipedia navigation popups
// Code courtesy of "Lupin" of Wikipedia.
// Source: http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js
// Modified by "Eulalia458678" on Wikia central.
// Source: http://www.wikia.com/index.php?title=User:Eulalia459678/global.js&action=edit&oldid=191383

///////////////////////////////////////////////////////////////////////////////////////////////////////////


// [[Wikipedia:Tools/Navigation_popups]]	 
			
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

newOption('popupAdminLinks', true);

/* From http://en.wikipedia.org/wiki/User:Manishearth/purger

My script purger for developers
This script will bypass your browser's cache for '''only''' the scripts listed in a cookie. This speeds up development.
For this script to work, all the imports you want this to apply to should go to [[Special:MyPage/imports.js]]
ADD ALL IMPORTS THERE, even ones you don't want purged. This script will purge the scripts in the cookie and no more.
The imports.js subpage is only so that the imports are executed after this script is executed.
 
*/
 
 
//Init stuff, nothing important
if(!readCookie("devMode")){
createCookie("devMode","",365)
}
addOnloadHook(function(){
 
addPortletLink("p-tb","javascript:createCookie('devMode',prompt('Change the autopurge pages: (Separate the script names with commas, please). \n Do NOT press cancel, or all the data in the cookie will be erased. Instead, press Ok.',readCookie('devMode')),365)","Purge scripts") // Sets the cookie with a prompt if clicked, the default text of the prompt is the current value of the cookie
 
 
});
 
//OVERRIDE importScript
function importScript(page) {
	// copy of importScript, except it allows purging
	var devTail="&rand="+parseInt(Math.random()*100000); //A random tail
	devTail2=(readCookie("devMode").toLowerCase().indexOf(page.toLowerCase())!=-1)?devTail :''; //Decide if the cookie tells us to purge
	var uri = wgScript + '?title=' +encodeURIComponent(page.replace(/ /g,'_')).replace(/%2F/ig,'/').replace(/%3A/ig,':') + '&action=raw&ctype=text/javascript'+devTail2; //Add the tail
	return importScriptURI(uri);
}
 
function importScriptPurged(page) {
	// Forces purging without reading cookie
	var devTail="&rand="+parseInt(Math.random()*100000);
	var uri = wgScript + '?title=' +encodeURIComponent(page.replace(/ /g,'_')).replace(/%2F/ig,'/').replace(/%3A/ig,':') + '&action=raw&ctype=text/javascript'+devTail;
	return importScriptURI(uri);
}
 
 
//Force purge imports.js, any changes made there will go live immediately
importScriptPurged("User:"+wgUserName+"/imports.js")
 
 
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
 
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

//javascript <li> filter from simple.wikipedia
document.write('<script type="text/javascript" src="' 
             + 'http://simple.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-rightsfilter.js'"></script>');