MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
Line 20: | Line 20: | ||
mw.loader.using( ['jquery'] ).then( function () { | mw.loader.using( ['jquery'] ).then( function () { | ||
$.getScript("https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js", function() { | $.getScript("https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js", function() { | ||
}); | }); | ||
Revision as of 19:19, 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 () {
$.getScript("https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js", 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" />');