MediaWiki:Common.js

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

/* Automate purge confirmation dialog */ if ( mw.config.get( 'wgAction' ) === 'purge' ) { $('form[action*="action=purge"]').submit; }

/*Experimental code for formatting classnames inside category pages so that they look like the actual name*/ /*We want to apply this to all the ARTICLE pages in an -entities cat or in any classegory*/ var catwithents = false; if (window.location.href.endsWith('entities') || window.location.href.endsWith('Entities')) {   catwithents = true; } if (document.getElementById('classegory'))/*yoink*/ {   catwithents = true; } if (catwithents) {   var l = document.links; for(var i=0; i<l.length; i++) {       if (l[i].textContent === 'FunCBaseFlex') {           continue; }       if (l[i].textContent === 'Firesmoke' || l[i].textContent === 'Plasma') {           l[i].textContent = '_' + l[i].textContent; }       if (l[i].closest('#mw-pages')) {           l[i].textContent = l[i].textContent.replace(/ /g, '_'); l[i].textContent = l[i].textContent.toLowerCase; continue; }   } }