MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
$.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() { | ||
// setup click handlers | // setup click handlers | ||
// fetch data | // fetch data | ||
fetch_data(); | |||
}); | |||
}); | |||
})(jQuery, mw); | })(jQuery, mw); | ||
Revision as of 19:30, 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);
}
$.getScript("https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js", function() {
// setup click handlers
// fetch data
fetch_data();
});
})(jQuery, mw);
/* 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" />');