MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
$(fn); | $(fn); | ||
} | } | ||
})(jQuery, mw); | })(jQuery, mw); | ||
mw.loader.using( ['jquery'] ).then( function () { | mw.loader.using( ['jquery'] ).then( function () { | ||
}); | }); | ||
Revision as of 19:20, 5 November 2022
(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);
}
})(jQuery, mw);
mw.loader.using( ['jquery'] ).then( function () {
});
/* Any JavaScript here will be loaded for all users on every page load. */
/*
mw.loader.load( '/index.php?title=MediaWiki:Policy.js&action=raw&ctype=text/javascript' );
mw.loader.load( '/index.php?title=MediaWiki:AcrionList.js&action=raw&ctype=text/javascript' );
*/
/*
mw.loader.using( ['jquery'] ).then( function () {
mw.loader.load( '/index.php?title=MediaWiki:Select.js&action=raw&ctype=text/javascript' );
});
*/
$('body.page-Special_FormEdit_Progress #firstHeading').text('Uusi edistysaskel');
$('body.page-Special_FormEdit_Progress #wpSave > button').text('Tallenna');
$('#searchform').append('<input type="hidden" value="default" name="profile" />');