MediaWiki:Common.js: Difference between revisions
Content deleted Content added
EUR amounts (matching USD) |
€ and Canadian $ formatting in different languages |
||
Line 1:
/**
* Any JavaScript here will be loaded for all users on every page load.
**/
Line 9:
var ret={};
if ( url.indexOf( '?' ) === -1 ) {
return ret;
}
var s = url.split( '?' ).slice( 1 ).join();
Line 53:
function adjustHPC() {
/* Adjust amounts based on highest previous contribution (hpc)
or most recent contribution (mrc) parameter. Used for emails.
TODO: split data out? */
Line 69:
var currency = $("input[name='currency_code']").val();
var language = mw.config.get('wgUserLanguage');
var radioAmountsData = {
Line 214 ⟶ 215:
var formats = {
"default" : "\t €"
},
"AUD" : "$\t",
"CAD" : {
"fr" : "$\t",
"default" : "$\t"
},
"GBP" : "£\t",
"NZD" : "$\t",
"JPY" : "¥\t",
"SEK" : "\t kr",
"BRL" : "R$\t"
};
var format = formats[currency] || '\t';▼
if ( formats[currency] instanceof Object ) { // not a string
format = formats[currency][language] || formats[currency]["default"]
} else {
}
// Radio button amounts
|