MediaWiki:Common.js

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

/* Replace namespace text with badges */ var namespaceCur = mw.config.get('wgCanonicalNamespace').split('_').join(' '); var pagenameCur = mw.config.get('wgTitle'); var firstHeading = document.getElementById('firstHeading');

// If the page is not in mainspace, replace the namespace text with a badge if (namespaceCur != '') { firstHeading.innerHTML = pagenameCur; firstHeading.insertAdjacentHTML('afterbegin',   '' + namespaceCur.toUpperCase + ': '); }