MediaWiki:Common.js: Difference between revisions
Content deleted Content added
whitespace cleanup |
No edit summary |
||
Line 37:
// TODO: allow loading different JS variants, either here or defined in the Template
mw.loader.load( '/w/index.php?title=MediaWiki:MonthlyConvert.js&action=raw&ctype=text/javascript' );
}
// Allow manual country selection and reload
var countrySelect = document.getElementById('country-select');
if ( countrySelect ) {
document.getElementById('country-select-go').addEventListener( 'click', function(e) {
if ( countrySelect.value ) {
mw.loader.using( ['mediawiki.Uri'] ).done( function() {
var uri = new mw.Uri( document.location.href );
uri.query.country = countrySelect.value;
document.location = uri.toString();
});
}
});
}
|