MediaWiki:Centralnotice-template-B14 0918 enUS mob pos btm

From Meta, a Wikimedia project coordination wiki

<script>

 /* MediaWiki:CentralNotice/Resources/BannerShowHideCountDate.js
  * Determine if a banner should be hidden or displayed based on the
  * contents of the cookie named `hide-cookie-name` and that + `-wait`.
  *
  * Showing a banner entails that a certain number of impressions have
  * already occured in a time period.
  * 
  * hide-cookie-show-count - Number of impressions to show per period
  * hide-cookie-wait-count - Number of impressions to wait per period
  * hide-cookie-wait-delay - Number of second in period
  *
  * Provides CentralNotice alterImpressionData hook
  * Banner may be forced if URL parameter force = 1
  * Counters may be reset if URL parameter reset = 1
  *
  * Flow chart: https://commons.wikimedia.org/wiki/File:CentralNotice_-_wait_cookie_code_flow.png
  */
 (function(mw) {
   var
     /** Total number of impressions seen by this user */
     cookieCount = parseInt($.cookie('centralnotice_bannercount_fr12')) || 0,
     waitData = ($.cookie('centralnotice_bannercount_fr12-wait') || ).split(/[|]/),
     /** This cycle's count of how many impressions we've waited for */
     waitCount = parseInt(waitData[0]) || 0,
     /** Timestamp (ms) until we can show another banner */
     waitUntil = parseInt(waitData[1]) || 0,
     /** Number of impressions seen this cycle */
     waitSeenCount = parseInt(waitData[2]) || 0,
     showLimit = parseInt('1000') || 0,
     waitLimit = parseInt('0') || 0,
     waitDelay = parseInt('2592000') || 0,
     hideBanner = true,
     hideReason = null;
   if (location.search.match(/\breset=1/)) {
     // Reset counters on demand
     cookieCount = 0;
     waitCount = 0;
     waitUntil = 0;
     waitSeenCount = 0;
   }
   var
     pastDate = waitUntil < new Date().getTime(),
     waitForHideImps = waitCount < waitLimit,
     waitForShowImps = waitSeenCount < showLimit;

   if (location.search.match(/\bforce=1/)) {
     hideBanner = false;
   } else if (!pastDate) {
     hideReason = 'waitdate';
     waitCount += 1;
   } else if (pastDate && waitForHideImps) {
     hideReason = 'waitimps';
     waitCount += 1;
   } else if (pastDate && !waitForHideImps && waitForShowImps) {
     hideBanner = false;
     waitSeenCount += 1;
     cookieCount += 1;
     
     if (waitSeenCount >= showLimit) {
       waitCount = 0;
       waitSeenCount = 0;
       waitUntil = new Date().getTime() + (waitDelay * 1000);
     }
   } else {
     hideReason = 'waiterr';
     waitCount = 0;
     waitSeenCount = 0;
     waitUntil = new Date().getTime() + (waitDelay * 1000);
   }
   waitData = waitCount + '|' + waitUntil + '|' + waitSeenCount;

   // Finish up and store results
   $.cookie('centralnotice_bannercount_fr12', cookieCount, { expires: 365, path: '/' });
   $.cookie('centralnotice_bannercount_fr12-wait', waitData, { expires: 365, path: '/' });
   mw.centralNotice.bannerData.hideResult = hideBanner;
   mw.centralNotice.bannerData.hideReason = hideReason;
   mw.centralNotice.bannerData.cookieCount = cookieCount;
 })(mediaWiki);

 mediaWiki.centralNotice.bannerData.alterImpressionData = function( impressionData ) {
   // Returning true from this function indicates the banner was shown
   if (mediaWiki.centralNotice.bannerData.hideReason) {
     impressionData.reason = mediaWiki.centralNotice.bannerData.hideReason;
   }
   if (mediaWiki.centralNotice.bannerData.cookieCount) {
     impressionData.banner_count = mediaWiki.centralNotice.bannerData.cookieCount;
   }
   return !mediaWiki.centralNotice.bannerData.hideResult;
 };

</script>

<style> /* Clearfix */

  1. frbanner .cf:before,
  2. frbanner .cf:after {
  content: "";
  display: table; }
  
  1. frbanner .cf:after { clear: both; }

.ie7 #frbanner .cf { zoom: 1; }


/* Border-Box */

  1. frbanner *,
  2. frbanner *:before,
  3. frbanner *:after {
   -moz-box-sizing: border-box; 
   -webkit-box-sizing: border-box; 
   box-sizing: border-box;
   }


/* Transitions */

  1. frbanner * {
   -webkit-transition: all .3s ease-in-out;
   -moz-transition:    all .3s ease-in-out;
   -o-transition:      all .3s ease-in-out;
   -ms-transition:     all .3s ease-in-out;
   transition:         all .3s ease-in-out; 
   }
  1. frbanner {
   top: 0 !important;
   width: 100%;
   }

/* Window Styles


*/

  1. frbanner-window {
   background: #fff;
   width: 90%;
   top: 20px !important;
   left: 5% !important;
   -moz-box-shadow:    0 0 10px rgba(90,97,98,.25);
   -webkit-box-shadow: 0 0 10px rgba(90,97,98,.25);
   box-shadow:         0 0 10px rgba(90,97,98,.25);
   position: absolute; 
   }
       
   @media (min-width : 330px)                                { #frbanner-window { width: 90%; left: 5% !important; }}    
   @media (min-width : 370px)                                { #frbanner-window { width: 92%; left: 4% !important;  }}
   @media (min-width : 570px) and (min-aspect-ratio: 13/9)  { #frbanner-window { width: 94%; left: 3% !important; }}
   @media (min-width : 640px) and (min-aspect-ratio: 13/9)  { #frbanner-window { width: 94%; left: 3% !important; }}
   @media (min-width : 650px) and (max-aspect-ratio: 13/9)   { #frbanner-window { width: 60%; left: 20% !important; top: 80px !important;}}
   @media (min-width : 650px) and (min-aspect-ratio: 13/9)  { #frbanner-window { width: 80%; left: 10% !important; top: 80px !important;}}
 
  1. frbanner-close {
   background: url('//upload.wikimedia.org/wikipedia/donate/c/cf/Close-trilogy.png') no-repeat center center;
   width: 20px;
   height: 21px;
   display: block;   
   cursor: pointer;
   position: absolute;
   right: 10px;
   top: 10px;
   opacity: .5;
   text-indent: -99999px;
   z-index: 999;
   }
   
   @media (min-width : 370px) { #frbanner-close { width: 15px; height: 16px; background-size: 75%; right: 5px; top: 5px; } }
   @media (min-width : 570px) { #frbanner-close { width: 20px; height: 21px; background-size: 100%; right: 10px; top: 10px;} }


  1. frbanner-close:active {
   opacity: 1; 
   }
   
   

/* --- Branding --- */

.frbanner-logo {

   width: 60%;
   margin: 0 20% 10px;
   text-align: center;
   }
   
   @media (min-width : 650px) { .frbanner-logo { margin-bottom: 20px; }}

.frbanner-logo img {

   width: 110px;
   opacity: .4;
   }
   
   @media (min-width : 330px) { .frbanner-logo img { width: 132px; }} 
   @media (min-width : 370px) { .frbanner-logo img { width: 110px; }} 
   @media (min-width : 490px) { .frbanner-logo img { width: 132px; }} 


/* --- Message --- */

  1. frbanner-window .frbanner-message {
   text-align: left;
   padding: 15px;
   font: .8em/1.1em "Helvetica Neue Light",Arial, Helvetica, sans-serif;
   font-style: normal;
   font-weight: 200;
   color: #3c3c3c; 
   }
     
   @media (min-width : 330px)                                { #frbanner-window .frbanner-message { padding: 20px; font-size: .95em; } } 
   @media (min-width : 370px) and (min-aspect-ratio: 13/9)  { #frbanner-window .frbanner-message { padding: 15px; width: 63%; float: left; font-size: .75em; line-height: 1.2em; } } 
   @media (min-width : 570px) and (min-aspect-ratio: 13/9)  { #frbanner-window .frbanner-message { padding: 20px; width: 65%; float: left; font-size: .9em; } }
   @media (min-width : 650px) and (max-aspect-ratio: 13/9)   { #frbanner-window .frbanner-message { padding: 30px; font-size: 1.15em; line-height: 1.3em; } }
   @media (min-width : 650px) and (min-aspect-ratio: 13/9)  { #frbanner-window .frbanner-message { padding: 30px; width: 66%; float: left; font-size: 1.2em; line-height: 1.3em; } }


  1. frbanner-window .frbanner-message p { margin-bottom: .5em; }
  1. frbanner-window .frbanner-message p:last-child { margin-bottom: 0; }
  1. frbanner-window .frbanner-message strong {
   font-family: "Helvetica Neue Bold",Arial, Helvetica, sans-serif;
   font-style: normal;
   font-weight: 600;
   }
   
  1. frbanner-window .frbanner-message .highlight { background: #fff000; font-weight: bold; }
  2. frbanner-window .frbanner-message .highlight span { position: relative; } /* prevent background from overlapping text */


/* --- Form --- */

  1. frbanner-form {
   background: #e2e2e2;
   padding: 10px 15px 15px 15px;
   position: relative;
   }

   @media (min-width : 330px)                                { #frbanner-form { padding: 15px 20px 20px; } } 
   @media (min-width : 370px) and (min-aspect-ratio: 13/9)  { #frbanner-form { padding: 20px 15px 15px; width: 37%; float: right; height: 250px;  }}
   @media (min-width : 570px) and (min-aspect-ratio: 13/9)  { #frbanner-form { padding: 30px 20px 20px; width: 35%; float: right; height: 290px; }}
   @media (min-width : 650px) and (max-aspect-ratio: 13/9)   { #frbanner-form { padding: 30px; } }
   @media (min-width : 650px) and (min-aspect-ratio: 13/9)  { #frbanner-form { padding: 30px; width: 34%; float: left; height: 435px; } }


  1. frbanner-form:before {
   height: 0; 
   width: 0;    
   margin-left: -10px;  
   content: " ";    
   position: absolute; 
   left: 50%; 
   top: 0;
   border-color: rgba(255, 255, 255, 0);    
   border: solid transparent; 
   pointer-events: none;
   border-top-color: white; 
   border-width: 10px; 
   }
   
   @media (min-width : 370px) and (min-aspect-ratio: 13/9) { 
       #frbanner-form:before  { 
           border-left-color: white; 
           left: 0; 
           top: 50%;
           margin: 0;
           border-color: rgba(255, 255, 255, 0);    
           border: solid transparent; 
           pointer-events: none;
           border-left-color: white; 
           border-width: 10px;   
           }}
  

.frbanner-amounts, .frbanner-submit {

   width: 100%;
   overflow: auto;
   zoom: 1;
   margin: 0 auto;
   padding: 0;
   }
   

.frbanner-amounts { margin-bottom: 10px; }

   @media (min-width : 370px)  { .frbanner-amounts { margin-bottom: 12px; }}   
   @media (min-width : 570px)  { .frbanner-amounts { margin-bottom: 15px; }}
   @media (min-width : 650px)  { .frbanner-amounts { margin-bottom: 30px;} }

.frbanner-amounts li, .frbanner-submit li {

   display: block;
   width: 32%;
   float: left;
   clear: none;
   margin: 0 2% 6px 0;
   }
   
   @media (min-width : 370px) and (min-aspect-ratio: 13/9) { .frbanner-amounts li, .frbanner-submit li  { width: 48%; margin-right: 4%;} }
   @media (min-width : 650px)  {  .frbanner-amounts li, .frbanner-submit li { margin-bottom: 10px; } }


.frbanner-amounts li:last-child, .frbanner-submit li:last-child { margin-right: 0; }

   @media (max-aspect-ratio: 13/9)   { .frbanner-amounts li#amount_total_3, .frbanner-amounts li#amount_total_6  { margin-right: 0; }}   
   @media (min-aspect-ratio: 13/9)  { .frbanner-amounts li#amount_total_2, .frbanner-amounts li#amount_total_4  { margin-right: 0; }}
   

.frbanner-submit li, .frbanner-amounts li#amount_total_5, .frbanner-amounts li#amount_total_6 {

   margin-bottom: 0;
   } 
   
   @media (max-aspect-ratio: 13/9)   { .frbanner-amounts li#amount_total_4  { margin-bottom: 0; }}   
   @media (min-aspect-ratio: 13/9)  { .frbanner-submit .credit-card  { margin-bottom: 6px; margin-right: 0; width: 100%; }} 
   @media (min-width : 650px)        { .frbanner-submit .credit-card { margin-bottom: 10px; } }
   
  1. frbanner li.subhead {
   width: 100%;
   margin: 0;
   text-align: center;
   font-size: 11px;
   text-transform: uppercase;
   color: #7c7c7c;
   }
   
   @media (min-width : 330px) { #frbanner li.subhead { font-size: 12px; }}
   @media (min-width : 370px) { #frbanner li.subhead { font-size: 11px; }}
   @media (min-width : 570px) { #frbanner li.subhead { font-size: 12px; }}
   @media (min-width : 650px) { #frbanner li.subhead { font-size: 15px; margin-bottom: 5px; } }

.frbanner-amounts li input[type="radio"] {

   /* Based on http://jqueryui.com/button/#radio */
   border: 0;
   clip: rect(0 0 0 0);
   height: 1px;
   margin: -1px;
   overflow: hidden;
   padding: 0;
   position: absolute;
   width: 1px; 
   }

.frbanner-amounts li label {

   display: block;
   width: 100%;
   height: 32px;
   padding: 5px;
   font: 1.2em/22px "Helvetica Neue Roman",Arial, Helvetica, sans-serif;
   font-style: normal;
   font-weight: 300;
   text-align: center;
   background: #367fb4;
   border:none;
   -moz-border-radius:    4px; 
   -webkit-border-radius: 4px;
   border-radius:         4px;
   color: #fff;
   cursor: pointer;
   outline: 0;
   backface-visibility: hidden;
   }
   
   @media (min-width : 330px) { .frbanner-amounts li label { height: 40px; font-size: 1.3em; line-height: 30px; }} 
   @media (min-width : 370px) { .frbanner-amounts li label { height: 28px; font-size: 1em; line-height: 18px; }}
   @media (min-width : 570px) { .frbanner-amounts li label { height: 28px; font-size: 1em; line-height: 18px; }}
   @media (min-width : 650px) { .frbanner-amounts li label { height: 50px; font-size: 1.4em; line-height: 40px; }}

.frbanner-amounts li label:active , .frbanner-amounts li input[type="radio"]:checked + label, .frbanner-amounts li input[type="radio"].checked + label {

   background: #0f4b76;
   }
  1. frbanner-window li.frbanner-submit {
   display: block; 
   margin:0;
   }
   
  1. frbanner-window button {
   background-color: #b10000;
   background-repeat:  no-repeat;
   background-position: center center;
   background-size: 80%;
   border: none;
   width: 100%;
   height: 40px;
   padding: 5px;
   line-height: 1;
   font-size: .9em;
   text-transform: uppercase;
   color: white;
   cursor: pointer;
   -moz-border-radius:    4px; 
   -webkit-border-radius: 4px;
   border-radius:         4px;
   }
   
   @media (min-width : 330px) { #frbanner-window button { height: 50px; font-size: 1em; line-height: 1; }} 
   @media (min-width : 370px) { #frbanner-window button { height: 30px; font-size: 1em; line-height: 1; }}
   @media (min-width : 570px) { #frbanner-window button { height: 40px; font-size: 1em; line-height: 30px; }}
   @media (min-width : 650px) { #frbanner-window button { height: 60px; font-size: 1.1em; line-height: 1; background-size: 60%; }}
   
  1. frbanner-window .paypal button,
  2. frbanner-window .amazon button {
   text-indent: -99999px; 
   }
         
   #frbanner-window .paypal button { background-image: url('/wikimedia/theme/img/paypal-logo.svg'); }
   #frbanner-window .amazon button { background-image: url('/wikimedia/theme/img/amazon-logo.svg'); }
 
  1. frbanner-window button:active {
   background-color: #840101; 
   }
  1. frbanner-window strong.error {
 background: #e5275d;
 padding: 3px 5px;   
 display: block;
 white-space: nowrap;
 position: absolute; 
 left: 50%;
 top: 41px;
 z-index: 9999;
 font-size: 10px;
 line-height: 10px;
 font-weight: 400;
 color: #fff; 
 text-transform: uppercase; 
 } 
 
  1. frbanner-window strong.error:after {
 height: 0; 
 width: 0;    
 margin-left: -6px;  
 content: " ";    
 position: absolute; 
 left: 15px; 
 bottom: 100%;
 border-color: rgba(229, 39, 93, 0);    
 border: solid transparent; 
 pointer-events: none;
 border-bottom-color: #e5275d; 
 border-width: 6px; 
 }


  1. frbanner-window button {
   background-color: #e7e7e7;
   -moz-box-shadow: 0 0 2px rgba(0,0,0,.2), inset 0 14px 16px rgba(255,255,255,.75), inset 0 0 7px #fff;
   -webkit-box-shadow: 0 0 2px rgba(0,0,0,.2), inset 0 14px 16px rgba(255,255,255,.75), inset 0 0 7px #fff;
   box-shadow: 0 0 2px rgba(0,0,0,.2), inset 0 14px 16px rgba(255,255,255,.75), inset 0 0 7px #fff;
   background-size: 80%;
   border: none;
   width: 100%;
   height: 40px;
   padding: 5px;
   line-height: 1;
   font-size: .9em;
   text-transform: uppercase;
   color: #367fb4;
   cursor: pointer;
   -moz-border-radius:    4px; 
   -webkit-border-radius: 4px;
   border-radius:         4px; }
   
  1. frbanner-window .paypal button { background-image: url('//upload.wikimedia.org/wikipedia/donate/8/8d/Paypal-color.svg'); }
  2. frbanner-window .amazon button { background-image: url('//upload.wikimedia.org/wikipedia/donate/e/e4/Amazon-color.svg'); }
  1. frbanner-window button:active {
 background-color: #f9f9f9;
 -moz-box-shadow: 0 0 2px rgba(0,0,0,.2), inset 1px 1px 3px rgba(0,0,0,.3), inset 0 0 7px #fff;
 -webkit-box-shadow: 0 0 2px rgba(0,0,0,.2), inset 1px 1px 3px rgba(0,0,0,.3), inset 0 0 7px #fff;
 box-shadow: 0 0 2px rgba(0,0,0,.2), inset 1px 1px 3px rgba(0,0,0,.3), inset 0 0 7px #fff; }


/* -- Smallprint -- */

  1. frbanner-window #frbanner-smallprint {
   width: 100%;
   font-size: 75%;
   padding: 5px 20px;
   background: #e2e2e2;

}

/* -- Bottom banner -- */

  1. frbanner2 {
 width: 100%;
 position: fixed;
 left: 0;
 bottom: 0;
 cursor: pointer; 
 text-align: center; }
  1. frbanner2 * {
 -webkit-transition: all .3s ease-in-out;
 -moz-transition:    all .3s ease-in-out;
 -o-transition:      all .3s ease-in-out;
 -ms-transition:     all .3s ease-in-out;
 transition:         all .3s ease-in-out; }
 
  1. frbanner2 .frbanner2-tab {
 background: #ffcc00;
 width: 180px;
 margin: 0 auto;
 padding: .3em .8em 0 .8em;
 display: block;
 position: relative;
 top: .3em;
 -moz-border-radius:    4px 4px 0 0;
 -webkit-border-radius: 4px 4px 0 0;
 border-radius:         4px 4px 0 0;
 font-size: .9em;
 color: #1c1c1c;
 font-weight: bold;
 cursor: pointer; }
  1. frbanner2:hover .frbanner2-tab { background: #ffdd00; }
  2. frbanner2 .frbanner2-tab img {
 float: left;
 margin: .25em .15em 0 0; }
  1. frbanner2 p {
 background: #ffcc00;
 padding: .7em;
 margin: 0;
 font-size: .8em;
 line-height: 1.1;
 color: #1c1c1c;
 text-align: center; }
  1. frbanner2:hover p { background: #ffdd00; }
  1. frbanner2-close {
   background: url('//upload.wikimedia.org/wikipedia/donate/c/cf/Close-trilogy.png') no-repeat center center;
   width: 1em;
   height: 1em;
   background-size: contain;
   float: right;
   display: block;
   cursor: pointer;
   text-indent: -99999px;
   z-index: 999;
   margin-left: 0.5em;

} </style>

<script> /**

* NOTE: The following currency mapping is WMF-specific based on payment
* provider availability, NOT necessarily the official currency of the country
*/

function getCurrency() {

   switch(Geo.country) {
       // Big 5 at the top for speed
       case "US": return "USD";
       case "CA": return "CAD";
       case "GB": return "GBP";
       case "AU": return "AUD";
       case "NZ": return "NZD";
       // Euro countries
       case "AD":
       case "AL":
       case "AM":
       case "AT":
       case "AW":
       case "AZ":
       case "BE":
       case "BY":
       case "CI":
       case "CY":
       case "DE":
       case "EE":
       case "ES":
       case "FI":
       case "FR":
       case "GF":
       case "GR":
       case "IE":
       case "IT":
       case "LT":
       case "LU":
       case "LV":
       case "LY":
       case "MC":
       case "ME":
       case "MG":
       case "MT":
       case "NL":
       case "PT":
       case "RE":
       case "RS":
       case "SI":
       case "SK":
       case "SM":
       case "SR":
       case "VA":
           return "EUR";
       // The rest
       case "AE": return "AED";
       case "AR": return "ARS";
       case "BA": return "BAM";
       case "BB": return "BBD";
       case "BD": return "BDT";
       case "BG": return "BGN";
       case "BH": return "BHD";
       case "BM": return "BMD";
       case "BO": return "BOB";
       case "BR": return "BRL";
       case "BZ": return "BZD";
       case "CH": return "CHF";
       case "CK": return "NZD";
       case "CL": return "CLP";
       case "CN": return "CNY";
       case "CO": return "COP";
       case "CR": return "CRC";
       case "CZ": return "CZK";
       case "DK": return "DKK";
       case "DO": return "DOP";
       case "DZ": return "DZD";
       case "EG": return "EGP";
       case "FJ": return "FJD";
       case "FO": return "DKK";
       case "GL": return "DKK";
       case "GT": return "GTQ";
       case "HK": return "HKD";
       case "HN": return "HNL";
       case "HR": return "HRK";
       case "HU": return "HUF";
       case "ID": return "IDR";
       case "IL": return "ILS";
       case "IN": return "INR";
       case "IS": return "ISK";
       case "JM": return "JMD";
       case "JO": return "JOD";
       case "JP": return "JPY";
       case "KE": return "KES";
       case "KI": return "AUD";
       case "KR": return "KRW";
       case "KZ": return "KZT";
       case "LB": return "LBP";
       case "LI": return "CHF";
       case "LK": return "LKR";
       case "MA": return "MAD";
       case "MK": return "MKD";
       case "MV": return "MVR";
       case "MW": return "GBP";
       case "MX": return "MXN";
       case "MY": return "MYR";
       case "NI": return "NIO";
       case "NO": return "NOK";
       case "NP": return "INR";
       case "NR": return "AUD";
       case "OM": return "OMR";
       case "PA": return "PAB";
       case "PE": return "PEN";
       case "PG": return "AUD";
       case "PH": return "PHP";
       case "PK": return "PKR";
       case "PL": return "PLN";
       case "PY": return "PYG";
       case "QA": return "QAR";
       case "RO": return "RON";
       case "RU": return "RUB";
       case "SA": return "SAR";
       case "SD": return "GBP";
       case "SE": return "SEK";
       case "SG": return "SGD";
       case "TH": return "THB";
       case "TM": return "RUB";
       case "TN": return "TND";
       case "TR": return "TRY";
       case "TT": return "TTD";
       case "TW": return "TWD";
       case "UA": return "UAH";
       case "UY": return "UYU";
       case "UZ": return "RUB";
       case "VE": return "VEF";
       case "VN": return "VND";
       case "VU": return "AUD";
       case "ZA": return "ZAR";
       // small multi-country currencies
       case "CW":
       case "SX":
           return "ANG";
       case "AG":
       case "DM":
       case "GD":
       case "KN":
       case "LC":
           return "XCD";
       case "BJ":
       case "BF":
       case "CI":
       case "GW":
       case "ML":
       case "NE":
       case "SN":
       case "TG":
           return "XOF";
       case "PF":
       case "NC":
       case "WF":
           return "XPF";
       // fall back to USD
       default:
           return "USD";
   }

} </script> <script> function getMinimum(currency){

   var minimums = {
       'ADF' : 5.95,
       'ADP' : 150.87,
       'AED' : 3.67,
       'AFA' : 60.47,
       'AFN' : 60.47,
       'ALL' : 124.74,
       'AMD' : 473.47,
       'ANG' : 1.82,
       'AOA' : 122.35,
       'AON' : 122.35,
       'ARS' : 14, // Astropay
       'ATS' : 12.48,
       'AUD' : 1.35,
       'AWG' : 1.79,
       'AZM' : 3926.19,
       'AZN' : 1.05,
       'BAM' : 1.77,
       'BBD' : 2,
       'BDT' : 76.04,
       'BEF' : 36.58,
       'BGL' : 1.77,
       'BGN' : 1.77,
       'BHD' : 0.37,
       'BIF' : 1599.65,
       'BMD' : 1,
       'BND' : 1.33,
       'BOB' : 6.71,
       'BRL' : 3.2,
       'BSD' : 0.99,
       'BTN' : 63.52,
       'BWP' : 9.89,
       'BYR' : 15378.7,
       'BZD' : 1.96,
       'CAD' : 1.27,
       'CDF' : 912.52,
       'CHF' : 0.95,
       'CLP' : 980, // Astropay
       'CNY' : 6.09,
       'COP' : 4000, // Astropay
       'CRC' : 523.08,
       'CUC' : 1,
       'CUP' : 23.15,
       'CVE' : 99.81,
       'CYP' : 0.53,
       'CZK' : 24.59,
       'DEM' : 1.77,
       'DJF' : 177.72,
       'DKK' : 6.77,
       'DOP' : 44.46,
       'DZD' : 99.04,
       'ECS' : 25588.54,
       'EEK' : 14.19,
       'EGP' : 7.81,
       'ESP' : 150.87,
       'ETB' : 20.5,
       'EUR' : 0.91,
       'FIM' : 5.39,
       'FJD' : 2.11,
       'FKP' : 0.65,
       'FRF' : 5.95,
       'GBP' : 0.65,
       'GEL' : 2.25,
       'GHC' : 37964.2,
       'GHS' : 3.8,
       'GIP' : 0.65,
       'GMD' : 38.45,
       'GNF' : 7251.79,
       'GRD' : 308.97,
       'GTQ' : 7.43,
       'GYD' : 197.27,
       'HKD' : 7.75,
       'HNL' : 21.27,
       'HRK' : 6.87,
       'HTG' : 52.41,
       'HUF' : 287.8,
       'IDR' : 13333.3,
       'IEP' : 0.71,
       'ILS' : 3.79,
       'INR' : 63.39,
       'IQD' : 1141.95,
       'IRR' : 29360,
       'ISK' : 133.46,
       'ITL' : 1755.66,
       'JMD' : 113.71,
       'JOD' : 0.71,
       'JPY' : 121.58,
       'KES' : 98.48,
       'KGS' : 62.13,
       'KHR' : 3995.54,
       'KMF' : 445,
       'KPW' : 135.01,
       'KRW' : 1134.04,
       'KWD' : 0.3,
       'KYD' : 0.82,
       'KZT' : 183.31,
       'LAK' : 7923.05,
       'LBP' : 1480.9,
       'LKR' : 130.3,
       'LRD' : 85,
       'LSL' : 12.5,
       'LTL' : 3.13,
       'LUF' : 36.58,
       'LVL' : 0.64,
       'LYD' : 1.34,
       'MAD' : 9.77,
       'MDL' : 18.71,
       'MGA' : 3252.88,
       'MGF' : 9149.13,
       'MKD' : 55.45,
       'MMK' : 1111.03,
       'MNT' : 1958,
       'MOP' : 7.79,
       'MRO' : 320.47,
       'MTL' : 0.39,
       'MUR' : 34.3,
       'MVR' : 14.97,
       'MWK' : 441.83,
       'MXN' : 24, // Astropay
       'MYR' : 3.8,
       'MZM' : 38000,
       'MZN' : 38,
       'NAD' : 12.5,
       'NGN' : 196.44,
       'NIO' : 26.24,
       'NLG' : 2,
       'NOK' : 8.2,
       'NPR' : 99.74,
       'NZD' : 1.5,
       'OMR' : 0.38,
       'PAB' : 1,
       'PEN' : 3.12,
       'PGK' : 2.68,
       'PHP' : 45.15,
       'PKR' : 100.4,
       'PLN' : 3.83,
       'PTE' : 181.78,
       'PYG' : 5065.03,
       'QAR' : 3.64,
       'ROL' : 40637.3,
       'RON' : 4.06,
       'RSD' : 108.68,
       'RUB' : 57.16,
       'RWF' : 721.7,
       'SAR' : 3.75,
       'SBD' : 7.83,
       'SCR' : 12.33,
       'SDD' : 592.4,
       'SDG' : 5.92,
       'SDP' : 2272.21,
       'SEK' : 8.5,
       'SGD' : 1.35,
       'SHP' : 0.62,
       'SIT' : 217.29,
       'SKK' : 27.32,
       'SLL' : 4158,
       'SOS' : 673,
       'SRD' : 3.24,
       'SRG' : 3240,
       'STD' : 22115.7,
       'SVC' : 8.54,
       'SYP' : 217.65,
       'SZL' : 12.5,
       'THB' : 33.94,
       'TJS' : 6.26,
       'TMM' : 14285.71,
       'TMT' : 2.85,
       'TND' : 1.97,
       'TOP' : 2.16,
       'TRL' : 2687990,
       'TRY' : 2.69,
       'TTD' : 6.25,
       'TWD' : 31.04,
       'TZS' : 2185.91,
       'UAH' : 21.25,
       'UGX' : 3454.24,
       'USD' : 1,
       'UYU' : 40, // Astropay
       'UZS' : 2541,
       'VEB' : 6290.36,
       'VEF' : 6.29,
       'VND' : 21482.8,
       'VUV' : 104.5,
       'WST' : 2.36,
       'XAF' : 595.84,
       'XAG' : 0.07,
       'XAU' : 0,
       'XCD' : 2.69,
       'XEU' : 0.91,
       'XOF' : 595.83,
       'XPD' : 0,
       'XPF' : 108.27,
       'XPT' : 0,
       'YER' : 214.8,
       'YUN' : 108.68,
       'ZAR' : 12.5,
       'ZMK' : 5327.65,
       'ZWD' : 376.36
   };
   if($.inArray(currency, minimums)){
       return minimums[currency];
   }
   return 1;

} </script> <script> /**

* Javascript for mobile banners.
* This version assumes checkboxes for amount, buttons for payment method
*
* Dependencies: MediaWiki:FR2013/Resources/Country2Currency.js
*/

/* Allow overriding country */ mw.loader.using(['mediawiki.util']).then(function() {

   if( mw.util.getParamValue("country") ) {
       Geo.country = mw.util.getParamValue("country");
   }

});

var fundraisingBanner = fundraisingBanner || {};

fundraisingBanner.validateForm = function(form) {

   /* Check the form, especially the amount submitted
    * Return the amount if valid, otherwise return false
    */
   var error = true;
   var amount = null;
   // If there are some amount radio buttons, then look for the checked one
   if (form.amount) {
       for (var i = 0; i < form.amount.length; i++) {
           if (form.amount[i].checked) {
               amount = form.amount[i].value;
           }
       }
   }
   // Check the "other" amount box
   if (form.amountGiven.value !== ) {
       var otherAmount = form.amountGiven.value;
       otherAmount = otherAmount.replace(/[,.](\d)$/, ':$10');
       otherAmount = otherAmount.replace(/[,.](\d)(\d)$/, ':$1$2');
       otherAmount = otherAmount.replace(/[$£€¥,.]/g, );
       otherAmount = otherAmount.replace(/:/, '.');
       form.amountGiven.value = otherAmount;
       amount = otherAmount;
   }
   // Check amount is a real number
   error = ( amount == null || isNaN(amount) || amount.value <= 0 );
   // Check amount is at least the minimum
   var currency = form.currency_code.value;
   if (amount < getMinimum(currency) || error) {
       alert('You must contribute at least $1'.replace('$1', getMinimum(currency) + ' ' + currency));
       error = true;
   }
   if ( error ) {
       return false;
   } else {
       return amount;
   }

};

fundraisingBanner.redirectPayment = function(paymentMethod, paymentSubMethod, skipValidation) {

   if ( skipValidation || fundraisingBanner.validateForm(document.paypalcontribution) ) {
       if (typeof paymentSubMethod == 'undefined') {
           paymentSubMethod = ;
       }
       var form = document.paypalcontribution; // we should really change this some day
       var paymentsURL = 'https://payments.wikimedia.org/index.php/Special:GatewayFormChooser';
       form.action = paymentsURL;
       if ( form.language.value === 'pt' && Geo.country === 'BR' ) {
           form.language.value = 'pt-br';
       }


       // WorldPay override for cc
       if( paymentMethod === 'cc-wp' ) {
           paymentMethod = 'cc';
           form.payment_method.value = 'cc';
           form.gateway.value = 'worldpay';
           form.ffname.value = 'worldpay';
       }
       
       // Adyen override for cc
       if( paymentMethod === 'cc-adyen' ) {
           paymentMethod = 'cc';
           form.payment_method.value = 'cc';
           form.gateway.value = 'adyen';
           form.ffname.value = 'adyen';
       }
       
       // Express Checkout override for PayPal
       if( paymentMethod === 'paypal-ec' ) {
           paymentMethod = 'paypal';
           form.payment_method.value = 'paypal';
           form.gateway.value = 'paypal_ec';
       }
       var frequency = $("input[name='frequency']:checked").val();
       if( frequency !== 'monthly' ){
           frequency = 'onetime';
           form.recurring.value = 'false';
       } else {
           form.recurring.value = 'true';
       }
       var mixins = mw.centralNotice.getDataProperty( 'mixins' );
       if ( mixins && mixins.bannerHistoryLogger ) {
           form.bannerhistlog.value = mw.centralNotice.bannerHistoryLogger.id;
       }
       form.utm_key.value = mw.centralNotice.bannerData.cookieCount || 0;
       form.payment_method.value = paymentMethod;
       form.payment_submethod.value = paymentSubMethod;
       
       var full_dotted_payment_method = paymentMethod;
       if ( form.recurring.value == 'true' ) {
           full_dotted_payment_method = 'r' + full_dotted_payment_method;
       }
       if ( paymentSubMethod ) {
           full_dotted_payment_method = form.payment_method.value + '.' + paymentSubMethod;
       }
       form.utm_source.value += '.no-LP.' + full_dotted_payment_method;
       $('.frbanner-submit button, .frbanner-continue button, .frbanner3-continue button').attr('disabled', 'disabled'); // Disable to prevent double submission
       if ( mixins && mixins.bannerHistoryLogger ) {
           mw.centralNotice.bannerHistoryLogger.ensureLogSent().always(function() {
               form.submit();
           });
       } else {
           form.submit();
       }
       
   }

};

$(document).ready( function () {

   var currency = getCurrency();
   var language = mw.config.get('wgUserLanguage');
   // set the form fields
   $("input[name='country']").val(Geo.country);
   $("input[name='currency_code']").val(currency);
   $("input[name='language']").val(mw.config.get('wgUserLanguage'));
   $("input[name='return_to']").val("Thank_You/" + mw.config.get('wgUserLanguage'));
   // Add utm_key with banner counter
   mw.centralNotice.events.bannerLoaded.done(function(e){
       $('[name="paypalcontribution"]').append($('<input>', {
           'type': 'hidden', 'name': 'utm_key', 'value': (mw.centralNotice.bannerData.cookieCount || 0)
       }));
   });

}); </script>

<script> $(document).ready(function() {

   $("#frbanner-close").click(function() {
       $("#frbanner").hide();
   });
   $("#frbanner2").click(function() {
       window.scrollTo(0,0);
       $("#frbanner").show();
       $("#frbanner2").slideToggle();
   });
   $("#frbanner2-close").click(function() {
       mw.centralNotice.hideBanner();
   });
   if (!mw.centralNotice.bannerData.hideResult) {
       // Show the correct sub-banner
       if (mw.centralNotice.bannerData.cookieCount === 1) {
           $('#frbanner').show();
       } else if (mw.centralNotice.bannerData.cookieCount > 1) {
           $('#frbanner2').show();
       }
   }

}); </script>