MediaWiki:Resources/CurrencyMinimums.js

From Donate
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
<html>
<script type="text/javascript" language="javascript">

function getMinimum(currency){
    var minimums = {
        'USD': 1,
        'EUR': 1,
        'AED': 4,
        'ANG': 1.8,
        'ARS': 4,
        'AUD': 1,
        'BBD': 2,
        'BDT': 76,
        'BGN': 1,
        'BHD': 1,
        'BMD': 1,
        'BND': 1,
        'BOB': 7,
        'BRL': 2,
        'BSD': 1,
        'BZD': 2,
        'CAD': 1,
        'CHF': 1,
        'CLP': 494,
        'CNY': 6,
        'COP': 1910,
        'CRC': 512,
        'CZK': 18,
        'DKK': 5,
        'DOP': 38,
        'DZD': 73,
        'EEK': 11,
        'EGP': 6,
        'FJD': 2,
        'GBP': 1,
        'GTQ': 8,
        'HKD': 8,
        'HNL': 19,
        'HRK': 5,
        'HUF': 219,
        'IDR': 8960,
        'ILS': 4,
        'INR': 49,
        'JMD': 85,
        'JOD': 1,
        'JPY': 78,
        'KES': 97,
        'KRW': 1127,
        'KWD': 0.3,
        'KYD': 1,
        'KZT': 147,
        'LBP': 1500,
        'LKR': 110,
        'LTL': 3,
        'LVL': 1,
        'MAD': 8,
        'MKD': 45,
        'MUR': 29,
        'MVR': 16,
        'MXN': 13,
        'MYR': 3,
        'NIO': 24,
        'NOK': 6,
        'NZD': 1,
        'OMR': 0.3,
        'PAB': 1,
        'PEN': 3,
        'PHP': 43,
        'PKR': 86,
        'PLN': 3,
        'PYG': 4190,
        'QAR': 4,
        'RON': 3,
        'RUB': 30,
        'SAR': 4,
        'SCR': 14,
        'SEK': 7,
        'SGD': 1.3,
        'SVC': 9,
        'THB': 30,
        'TJS': 5,
        'TND': 1,
        'TRY': 2,
        'TTD': 6,
        'TWD': 30,
        'TZS': 2000,
        'UAH': 8,
        'UYU': 19,
        'UZS': 1810,
        'VND': 21000,
        'VUV': 94,
        'XAF': 470,
        'XCD': 3,
        'XOF': 476,
        'XPF': 91,
        'ZAR': 7.8
    };

    if($.inArray(currency, minimums)){
        return minimums[currency];
    }

    return 1;
}
</script>
</html>