MediaWiki:Common.js

// Any JavaScript here will be loaded for all users on every page load.

// // Special:MovePage // Uncheck "Leave a redirect behind" if moving a file // $(function {	var isMovingFile = mw.config.get("wgPageName").startsWith("Special:MovePage/File");	if(isMovingFile) {		var leaveRedirectCheckbox = $("input[name=wpLeaveRedirect]")[0];		leaveRedirectCheckbox.checked = false;	} });

// // Special:ExpandTemplates // Check "Suppress tags in result" when using ExpandTemplates // $(function {	if (mw.config.get("wgPageName") == "Special:ExpandTemplates") {		var suppressNowikiTagsCheckbox = $("input[name=wpRemoveNowiki]")[0];		suppressNowikiTagsCheckbox.checked = true;	} });

// -- // Use altrow styling on Cargo tables // -- $(function {	$(".cargoTable")		.addClass('altrow')		.removeClass('cargoTable') //because the class overrides altrow styles });

// -- // CrazyEgg Tracking // -- setTimeout(function{	var a=document.createElement("script"),	   b=document.getElementsByTagName("script")[0];	a.src=document.location.protocol+"//script.crazyegg.com/pages/scripts/0011/8371.js?"+Math.floor(new Date.getTime/3600000);	a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);