MediaWiki:Common.js: Difference between revisions

Content deleted Content added
No edit summary
allow country confirm to be triggered by url
Line 1:
/**
* MediaWiki:Common.js - Any JavaScript here will be loaded for all users on every page load.
**/
Line 86:
enableCountrySelect();
}
 
try {
let uri = new mw.Uri( window.location.href );
if ( uri.query.showCountryConfirm ) {
document.getElementById('country-confirm').style.display = 'block';
}
} catch (error) {
console.warn('Error parsing URL. Possibly due to unreplaced % signs?');
}
 
// Code for Thank You pages - https://donate.wikimedia.org/wiki/MediaWiki:ThankYouPage.js