MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
No edit summary
No edit summary
Line 47: Line 47:
// Translations
// Translations
if ( language !== 'en' && language !== 'en-gb' ) {
if ( language !== 'en' && language !== 'en-gb' ) {
const translationsUrl = 'https://donate.wikimedia.org/wiki/Module:Country_links/data.json?action=raw'
const translationsUrl = 'https://donate.wikimedia.org/wiki/Module:Country_links/data.json?action=raw';
$.getJSON( translationsUrl, function( translations ) {
$.getJSON( translationsUrl, function( translations ) {
if ( translations[language] ) {
if ( translations[language] ) {
Line 74: Line 74:
}
}
});
});
}
};


if ( document.getElementById('country-change') ) {
if ( document.getElementById('country-change') ) {
Line 84: Line 84:


// TODO: only do this when actually needed e.g. geolocate error
// TODO: only do this when actually needed e.g. geolocate error
if ( document.getElementById('country-select') ) {
// if ( document.getElementById('country-select') ) {
enableCountrySelect();
// enableCountrySelect();
}
// }


// Code for Thank You pages - https://donate.wikimedia.org/wiki/MediaWiki:ThankYouPage.js
// Code for Thank You pages - https://donate.wikimedia.org/wiki/MediaWiki:ThankYouPage.js