MediaWiki:DonationForm.js: Difference between revisions

Content deleted Content added
Small correction from $2.75 to $3.50 in hpcSet FY2425_E1_T14_USD
Tag: Reverted
Updating preSelect to work with decimal numbers ending in zero (e.g. 2.50)
Tag: Reverted
Line 633:
var preSelectAmount = parseFloat( mw.util.getParamValue('preSelect') );
if ( preSelectAmount > 0 ) {
var $preSelectOption = $('input[name="amount"][value="' + preSelectAmount + '"]');
if ( preSelectAmount % 1 !== 0 ){formattedAmount = donationForm.formatAmount(preSelectAmount);}
else { formattedAmount = preSelectAmount;}
var $preSelectOption = $('input[name="amount"][value="' + preSelectAmountformattedAmount + '"]');
if ( $preSelectOption.length ) {
// Select existing input