You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
/**
* Adds CSS classes to the body tag based on the categories this page belongs to. Used for CR/Astral page theming.
*
* @source https://www.mediawiki.org/wiki/Snippets/Style_pages_based_on_categories
* @revision 2016-01-18
*/
(function($, mw) {
var fn = function() {
var cats = mw.config.get('wgCategories'), newClasses;
if (cats) {
newClasses = $.map(cats, function(el) {
return 'cat-' + encodeURIComponent(el.replace(/[ .]/g, '_')).replace(/%/g, '_');
}).join(' ');
$(document.body).addClass(newClasses);
}
};
if (document.body) {
fn();
} else {
$(fn);
000
1:0
Return to MediaWiki:Common.js.