MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
fix
only do India form checks if form is present
Line 353: Line 353:
// Strip protocol to stop firewall throwing fits
// Strip protocol to stop firewall throwing fits
document.paypalcontribution.referrer.value = document.referrer.replace(/https?:\/\//i, "");
document.paypalcontribution.referrer.value = document.referrer.replace(/https?:\/\//i, "");

// hide frequency options in India, where we can only handle one-time donations
if (document.paypalcontribution.country.value === 'IN') {
$("#frequency_onetime").prop('checked', true);
$(".frequency-options").hide();
$("#cancel-monthly").hide();
}
}
}


Line 368: Line 375:
});
});


// hide frequency options in India, where we can only handle one-time donations
if (document.paypalcontribution.country.value === 'IN') {
$("#frequency_onetime").prop('checked', true);
$(".frequency-options").hide();
$("#cancel-monthly").hide();
}


// Allow preselecting monthly
// Allow preselecting monthly