MediaWiki:DonationForm.js: Difference between revisions

Content deleted Content added
rm unneeded todo, on donatewiki Apple Pay per country is handled in form templates
add retry for country=XX - phab:T316578
Tag: Reverted
Line 1,143:
$(document).ready(function() {
 
mw.loader.using( ['mediawiki.util', 'mediawiki.Uri'] ).done( function() {
// If there was a problem detecting country, try sending them round again
// for another bite at the cookie - https://phabricator.wikimedia.org/T316578
var uri = new mw.Uri( window.location.href );
if ( uri.query.country === 'XX' && uri.query.retried === undefined ) {
uri.path = '';
uri.query.retried = 1; // only do this once
delete uri.query.country;
delete uri.query.title;
window.location.href = uri.toString();
}
 
var form = document.forms['donateForm'];