MediaWiki:MonthlyConvert.js: Difference between revisions

Content deleted Content added
split EUR and GBP from USD etc so that we don't suggest for under $3. Add LATAM currencies
also check wmf_medium for endowment
 
(6 intermediate revisions by the same user not shown)
Line 37:
],
'USD' : [ // also CAD, AUD, NZD
[ 2.9974, 0 ],
[ 9, 1.75 ],
[ 12, 2 ],
Line 96:
[ Infinity, 0 ]
],
'SEK' : [ // Also NOK
[ 2529, 0 ],
[ 5035, 2520 ],
[ 10055, 3025 ],
[ 200105, 5030 ],
[ 300160, 7040 ],
[ 500210, 9050 ],
[ 1000360, 11060 ],
[ 2500450, 25075 ],
[ 5000600, 500100 ],
[ 800, 125 ],
[ 900, 150 ],
[ 1200, 200 ],
[ 1500, 250 ],
[ 1800, 300 ],
[ 2100, 350 ],
[ Infinity, 0 ]
],
Line 173 ⟶ 179:
[ Infinity, 0 ]
],
'DKK' : [ // Also NOK
[ 19, 0 ],
[ 2025, 10 ],
[ 120, 20 ],
[ 180250, 3040 ],
[ 300350, 50 ],
[ 450, 75 ],
[ 600, 100 ],
Line 310 ⟶ 316:
mc.amounts.RON = mc.amounts.MYR;
mc.amounts.PLN = mc.amounts.MYR;
mc.amounts.NOK = mc.amounts.DKKSEK;
 
mc.getSuggestedAmount = function ( amount, currency ) {
Line 387 ⟶ 393:
}
 
if ( mw.util.getParamValue( 'wmf_medium' ) === 'endowment' || mw.util.getParamValue( 'utm_medium' ) === 'endowment' ) {
// No recurring for endowment
skipMc = true;
Line 399 ⟶ 405:
if ( donationForm.noRecurringCountries.indexOf( params.country ) !== -1 ) {
// Country where we don't offer any recurring
skipMc = true;
}
 
if ( params.payment_method === 'paypal' && donationForm.noRecurringPaypalCountries.indexOf( params.country ) !== -1 ) {
skipMc = true;
}
Line 461 ⟶ 471:
 
$('.mc-modal-screen').show();
document.querySelector('.mc-button').focus();
$('body').addClass('modal-open');
}