Donate
donatewiki
https://donate.wikimedia.org/wiki/Special:FundraiserRedirector
MediaWiki 1.47.0-wmf.16
first-letter
Media
Special
Talk
User
User talk
Donate
Donate talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
Campaign
Campaign talk
TimedText
TimedText talk
Module
Module talk
Template:Styles/Default.css
10
6437
42983
42961
2026-08-18T16:23:18Z
Pcoombe
5
forced-colors styles for selected buttons
42983
css
text/css
/* === Template:Styles/Default.css === */
*,
*:before,
*:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/* visually hidden - screenreader only */
.sr-only {
border: 0 !important;
clip: rect(1px, 1px, 1px, 1px) !important;
-webkit-clip-path: inset(50%) !important;
clip-path: inset(50%) !important;
height: 1px !important;
margin: -1px !important;
overflow: hidden !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important;
white-space: nowrap !important;
}
body {
margin: 0;
padding: 0;
font-family: sans-serif;
line-height: 1.6;
font-size: 16px;
color: #202122;
}
p {
margin: 0.5em 0;
}
/* Hide these until the required JavaScript fiddling has been done */
#actual-form,
.consider-amounts {
display: none;
}
#actual-form-loading {
text-align: center;
line-height: 1.2;
}
.error-nojs {
max-width: 300px;
color: #d73333;
}
/* Hide default MediaWiki stuff we don't want */
#mw-page-base, #mw-head-base,
#mw-panel .portal,
#mw-head, #catlinks,
#firstHeading, #contentSub, #contentSub2, #siteSub,
#jump-to-nav, .uls-tipsy,
.mw-editsection, .printfooter {
display: none;
}
.mw-jump-link {
display: none !important;
}
/* Hide minerva stuff */
.header-container {
display: none;
}
/* Vector 2022 */
.vector-column-end,
.vector-main-menu-landmark,
.vector-header-end,
.vector-page-titlebar,
.vector-page-toolbar {
display: none !important;
}
/* Re-add gradient background */
body {
background-image: linear-gradient(to bottom, #fff 40px, #f6f6f6 80px);
background-position: top;
background-repeat: repeat-x;
background-color: #f6f6f6;
}
body #content {
background-color: transparent;
background-image: none;
border: 0;
padding-top: 32px;
}
/* Link colors for visibility */
.mw-parser-output a,
.mw-parser-output a.external,
.mw-parser-output a.extiw {
color: #36c;
text-decoration: none;
}
.mw-parser-output a:visited,
.mw-parser-output a.external:visited,
.mw-parser-output a.extiw:visited {
color: #6f4db3;
}
.mw-parser-output a:hover,
.mw-parser-output a.external:hover,
.mw-parser-output a.extiw:hover {
text-decoration: underline;
}
.lp-error {
color: #d73333;
font-weight: 500;
font-size: 14px;
}
/* Prevent site logos from showing through modals (e.g. for monthly convert) */
.vector-body {
position: inherit;
}
body.modal-open {
overflow: hidden;
position: fixed;
}
/* --- Overall layout of the landing page --- */
#main-wrapper {
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 24px;
}
body.rtl #main-wrapper {
direction: rtl;
}
#form-wrapper {
width: 380px;
background-color: #fff;
border: 1px solid #a2a9b1;
border-radius: 2px;
padding: 24px;
font-size: 14px;
}
#appeal-wrapper {
flex: 1 0 0;
}
/* --- Appeal --- */
#appeal {
font-size: 16px;
}
#appeal .mw-heading2,
#appeal-head {
font-size: 21px;
padding-bottom: 10px;
border-bottom: 1px solid #a2a9b1;
margin-bottom: 21px;
}
.quote-wrapper {
padding: 140px 0;
}
/* --- Hide non-recurring capable payment methods on recurring forms --- */
.form-monthly .not-monthly-capable,
form[data-frequency="monthly"] .not-monthly-capable,
form[data-frequency="annual"] .not-monthly-capable {
display: none;
}
/* --- Form --- */
#donate-form-wrapper fieldset {
width: 100%;
border: 0;
margin: 0 0 8px 0;
padding: 0;
}
.frequency-options ul,
.amount-options ul {
display: grid;
margin: 0;
padding: 0;
list-style: none;
gap: 8px;
margin-bottom: 8px;
}
.frequency-options ul {
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}
.amount-options ul {
grid-template-columns: 1fr 1fr 1fr 1fr;
}
.frequency-options ul li,
.amount-options ul li {
padding: 0;
}
/* --- Subheaders --- */
#radiobuttons-table-header,
#paymenttype-table-header {
display: block;
margin-bottom: 6px;
text-align: center;
font-weight: bold;
}
/* --- Commmon button styles --- */
.frequency-options input[type="radio"],
.amount-options input[type="radio"] {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
border: 0;
clip: rect(0 0 0 0);
}
.frb-btn,
.payment-method-button {
display: flex;
justify-content: center;
align-content: center;
align-items: center;
flex-wrap: wrap;
text-align: center;
height: 50px;
padding: 0 2px;
border-radius: 2px;
font-family: inherit;
font-weight: 500;
line-height: 1.2;
cursor: pointer;
transition: background-color 100ms, color 100ms, border-color 100ms, box-shadow 100ms;
background-color: #f8f9fa;
color: #222;
border: 1px solid #a2a9b1;
}
.frb-btn:hover {
background-color: #fff;
color: #444;
border-color: #a2a9b1;
}
.frb-btn:active {
background-color: #c8ccd1;
color: #000;
border-color: #72777d;
box-shadow: none;
}
input[type="radio"]:checked + .frb-btn {
background-color: #2a4b8d;
color: #fff;
border-color: #2a4b8d;
}
@media screen and (forced-colors: active) {
input[type="radio"]:checked + .frb-btn {
background-color: Highlight;
color: HighlightText;
}
}
.frb-btn:focus,
.payment-method-button:focus {
outline: 0;
border-color: #36c;
box-shadow: inset 0 0 0 1px #36c;
}
input[type="radio"]:focus + .frb-btn,
input[type="radio"]:checked + .frb-btn:focus {
box-shadow: inset 0 0 0 1px #36c, inset 0 0 0 2px #fff;
}
.payment-method-button {
color: #36c;
}
.payment-method-button:hover {
background-color: #fff;
border-color: #447ff5;
}
.payment-method-button:active {
background-color: #eff3fa;
color: #2a4b8d;
border-color: #2a4b8d;
box-shadow: none;
}
/* --- Donation Amounts --- */
.amount-options .frb-btn {
height: 60px;
font-size: 15px;
line-height: 1.2;
text-align: center;
}
/* Smaller font size for countries with v long amounts */
.country-CO .amount-options .frb-btn,
.country-CR .amount-options .frb-btn,
.country-KR .amount-options .frb-btn,
.country-PY .amount-options .frb-btn,
.country-VN .amount-options .frb-btn {
font-size: 13px;
}
.input_amount_other .frb-btn span {
display: block;
font-size: 12px;
line-height: 1;
margin-bottom: 2px;
white-space: normal;
text-align: center;
}
.input_amount_other input {
display: block;
width: 100%;
border: 1px solid #a2a9b1;
color: #222;
padding: 2px;
border-radius: 2px;
direction: ltr;
text-align: center;
font-family: inherit;
font-size: 16px; /* must be >=16px or mobile Safari zooms in when selected */
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
margin: 0 4px;
}
/* --- Opt-in and PTF input styles --- */
.lp-radio-wrapper,
.lp-checkbox-wrapper {
display: table;
}
.lp-radio,
.lp-checkbox {
display: table-cell;
vertical-align: top;
margin: 7px 8px 8px 2px;
cursor: pointer;
}
body.rtl .lp-radio,
body.rtl .lp-checkbox {
margin: 7px 2px 8px 8px;
}
.lp-radio-label,
.lp-checkbox-label {
display: table-cell;
vertical-align: top;
padding: 4px 0;
white-space: normal;
font-size: 14px;
line-height: 18px;
font-weight: normal;
cursor: pointer;
}
.lp-radio-label:hover,
.lp-radio:focus + .lp-radio-label,
.lp-radio:hover + .lp-radio-label,
.lp-checkbox-label:hover,
.lp-checkbox:focus + .lp-checkbox-label,
.lp-checkbox:hover + .lp-checkbox-label {
color: #36c;
text-decoration: none;
}
.lp-radio:disabled + .lp-radio-label,
.lp-checkbox:disabled + .lp-checkbox-label {
color: #a2a9b1;
}
/* --- Opt-in --- */
.optin-options legend {
padding: 0;
font-size: inherit;
font-weight: bold;
}
.optin-options ul {
list-style: none;
margin: 0;
padding: 0;
}
.optin-options li {
display: table;
}
.optin-smallprint {
clear: both;
font-size: 12px;
line-height: 14px;
margin-top: 8px;
}
.optin-no-prompt {
display: none;
margin: 0;
padding: 6px;
border: 2px solid #900;
border-radius: 2px;
font-size: 14px;
line-height: 18px;
font-weight: normal;
}
.optin-no-prompt.is-positive {
border-color: #14866d;
font-weight: bold;
}
.optin-no-prompt__yes { display: none; }
.optin-no-prompt__no { display: block; }
.optin-no-prompt.is-positive .optin-no-prompt__yes { display: block; }
.optin-no-prompt.is-positive .optin-no-prompt__no { display: none; }
/* --- PTF --- */
.ptf {
display: none;
}
/* --- Payment method buttons --- */
.payment-method-div {
padding: 4px 0;
}
/* Hide extra empty <p> tags between buttons */
.payment-method-div ~ p {
display: none;
}
.payment-method-button {
margin: 0;
width: 100%;
font-size: 17px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
overflow: hidden;
gap: 2px;
}
/* --- Infobox ("Where your donation goes") --- */
#infobox-wrapper {
font-size: 13px;
line-height: 1.4;
color: #54595d;
font-weight: normal;
margin-top: 8px
}
#infobox-wrapper .mw-heading2 {
font-size: 16px;
font-weight: bold;
color: inherit;
border: 0;
margin-bottom: 8px;
}
#infobox-wrapper h2 {
font-size: inherit;
}
/* --- Privacy and links --- */
#donate-footer {
width: 100%;
max-width: 948px;
margin: 24px auto;
text-align: left;
font-size: 13px;
line-height: 1.4;
color: #54595d;
}
/* RTL fix for footer.*/
[lang="ar"] #donate-footer,
[lang="he"] #donate-footer,
[lang="fa"] #donate-footer,
[lang="ur"] #donate-footer,
[lang="ps"] #donate-footer,
[lang="sd"] #donate-footer,
[lang="dv"] #donate-footer,
[lang="yi"] #donate-footer,
[lang="ckb"] #donate-footer {
text-align: start;
}
#donate-footer > div {
margin-bottom: 1em;
}
.form-info-links,
.form-info-links ul {
list-style: none;
margin: 0;
text-align: center;
font-size: 15px;
}
.form-info-links li {
display: inline-block;
}
.form-info-links a {
padding: 14px !important;
}
/* --- Footer --- */
.mw-footer {
display: none;
}
/* Credit card logos.
* Classes are added by https://donate.wikimedia.org/wiki/MediaWiki:DonationForm.js ---
*/
.paymentmethod-cc svg {
display: none;
}
.cctypes-vmad,
.cctypes-vmaj,
.cctypes-vmj,
.cctypes-vma,
.cctypes-vm,
.cctypes-CBvma,
.cctypes-vmar {
font-size: 0; /* Remove spacing between icons */
}
.cctypes-vmad .cc-logo-visa,
.cctypes-vmad .cc-logo-mastercard,
.cctypes-vmad .cc-logo-amex,
.cctypes-vmad .cc-logo-discover,
.cctypes-vmaj .cc-logo-visa,
.cctypes-vmaj .cc-logo-mastercard,
.cctypes-vmaj .cc-logo-amex,
.cctypes-vmaj .cc-logo-jcb,
.cctypes-vmj .cc-logo-visa,
.cctypes-vmj .cc-logo-mastercard,
.cctypes-vmj .cc-logo-jcb,
.cctypes-vma .cc-logo-visa,
.cctypes-vma .cc-logo-mastercard,
.cctypes-vma .cc-logo-amex,
.cctypes-vm .cc-logo-visa,
.cctypes-vm .cc-logo-mastercard,
.cctypes-CBvma .cc-logo-CB,
.cctypes-CBvma .cc-logo-visa,
.cctypes-CBvma .cc-logo-mastercard,
.cctypes-CBvma .cc-logo-amex,
.cctypes-vmar .cc-logo-visa,
.cctypes-vmar .cc-logo-mastercard,
.cctypes-vmar .cc-logo-amex,
.cctypes-vmar .cc-logo-rupay {
display: inline-block !important;
}
.paymentmethod-cc .cc-logo-rupay {
border: 0;
}
/* Logos - WP on top, WMF horizontal below */
#p-logo a {
/* Need explicit height for backgrounds for IE */
background: top 30% center/160px 24px url(https://donate.wikimedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg), top 70% center/160px 37px url(https://upload.wikimedia.org/wikipedia/donate/6/60/Wmf_logo_horiz_K.svg);
background-repeat: no-repeat;
margin-left: 8px;
}
/* Mobile styles */
@media (max-width: 981px) {
/* Text & Logo layout */
body.skin-vector-legacy #content {
margin: 0;
padding: 140px 24px 24px 24px;
}
#mw-panel, #p-logo, #p-logo a {
width: 100% !important;
height: 140px;
margin: 0;
}
#p-logo a {
margin-left: 0;
}
/* Hide appeal */
#appeal-wrapper {
display: none;
}
#form-wrapper {
padding: 16px;
}
/* Footer */
div#footer {
margin: 0;
}
}
@media (max-width: 721px) {
/* Stack appeal and form */
#appeal-wrapper {
flex-basis: 100%;
padding: 0;
}
}
@media (max-width: 501px) {
/* Appeal same width as form */
#appeal-wrapper {
max-width: 380px;
padding: 0;
}
body.skin-vector-legacy #content {
padding: 140px 8px 8px 8px;
}
#donate-footer {
max-width: 380px;
}
}
#country-confirm {
text-align: center;
margin-top: -12px;
padding: 4px 0;
border-bottom: 1px solid #a2a9b1;
margin-bottom: 8px;
font-size: 90%;
}
@media (min-width: 980px) {
#country-confirm {
margin-top: -18px;
}
}
/* -- Donate skin fixes -- */
body.skin-donate .mw-body-content {
padding: 0 24px 24px 24px;
}
body.skin-donate #p-logo a {
display: block;
}
body.skin-donate h2 {
font-size: 21px;
font-weight: normal;
margin-bottom: 0;
}
@media screen and (min-width: 982px) {
body.skin-donate .mw-body-content {
padding: 1.25em 1.5em 1.5em 1.5em;
}
body.skin-donate #main-wrapper {
margin-left: 200px;
width: auto;
}
body.skin-donate #p-logo a {
position: absolute;
display: block;
height: 160px;
width: 160px;
left: 16px;
}
}
/* === end of Template:Styles/Default.css === */
cwk9d9sfhi0oguligw19six3hd0ghba
42984
42983
2026-08-18T16:24:01Z
Pcoombe
5
42984
css
text/css
/* === Template:Styles/Default.css === */
*,
*:before,
*:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/* visually hidden - screenreader only */
.sr-only {
border: 0 !important;
clip: rect(1px, 1px, 1px, 1px) !important;
-webkit-clip-path: inset(50%) !important;
clip-path: inset(50%) !important;
height: 1px !important;
margin: -1px !important;
overflow: hidden !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important;
white-space: nowrap !important;
}
body {
margin: 0;
padding: 0;
font-family: sans-serif;
line-height: 1.6;
font-size: 16px;
color: #202122;
}
p {
margin: 0.5em 0;
}
/* Hide these until the required JavaScript fiddling has been done */
#actual-form,
.consider-amounts {
display: none;
}
#actual-form-loading {
text-align: center;
line-height: 1.2;
}
.error-nojs {
max-width: 300px;
color: #d73333;
}
/* Hide default MediaWiki stuff we don't want */
#mw-page-base, #mw-head-base,
#mw-panel .portal,
#mw-head, #catlinks,
#firstHeading, #contentSub, #contentSub2, #siteSub,
#jump-to-nav, .uls-tipsy,
.mw-editsection, .printfooter {
display: none;
}
.mw-jump-link {
display: none !important;
}
/* Hide minerva stuff */
.header-container {
display: none;
}
/* Vector 2022 */
.vector-column-end,
.vector-main-menu-landmark,
.vector-header-end,
.vector-page-titlebar,
.vector-page-toolbar {
display: none !important;
}
/* Re-add gradient background */
body {
background-image: linear-gradient(to bottom, #fff 40px, #f6f6f6 80px);
background-position: top;
background-repeat: repeat-x;
background-color: #f6f6f6;
}
body #content {
background-color: transparent;
background-image: none;
border: 0;
padding-top: 32px;
}
/* Link colors for visibility */
.mw-parser-output a,
.mw-parser-output a.external,
.mw-parser-output a.extiw {
color: #36c;
text-decoration: none;
}
.mw-parser-output a:visited,
.mw-parser-output a.external:visited,
.mw-parser-output a.extiw:visited {
color: #6f4db3;
}
.mw-parser-output a:hover,
.mw-parser-output a.external:hover,
.mw-parser-output a.extiw:hover {
text-decoration: underline;
}
.lp-error {
color: #d73333;
font-weight: 500;
font-size: 14px;
}
/* Prevent site logos from showing through modals (e.g. for monthly convert) */
.vector-body {
position: inherit;
}
body.modal-open {
overflow: hidden;
position: fixed;
}
/* --- Overall layout of the landing page --- */
#main-wrapper {
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 24px;
}
body.rtl #main-wrapper {
direction: rtl;
}
#form-wrapper {
width: 380px;
background-color: #fff;
border: 1px solid #a2a9b1;
border-radius: 2px;
padding: 24px;
font-size: 14px;
}
#appeal-wrapper {
flex: 1 0 0;
}
/* --- Appeal --- */
#appeal {
font-size: 16px;
}
#appeal .mw-heading2,
#appeal-head {
font-size: 21px;
padding-bottom: 10px;
border-bottom: 1px solid #a2a9b1;
margin-bottom: 21px;
}
.quote-wrapper {
padding: 140px 0;
}
/* --- Hide non-recurring capable payment methods on recurring forms --- */
.form-monthly .not-monthly-capable,
form[data-frequency="monthly"] .not-monthly-capable,
form[data-frequency="annual"] .not-monthly-capable {
display: none;
}
/* --- Form --- */
#donate-form-wrapper fieldset {
width: 100%;
border: 0;
margin: 0 0 8px 0;
padding: 0;
}
.frequency-options ul,
.amount-options ul {
display: grid;
margin: 0;
padding: 0;
list-style: none;
gap: 8px;
margin-bottom: 8px;
}
.frequency-options ul {
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}
.amount-options ul {
grid-template-columns: 1fr 1fr 1fr 1fr;
}
.frequency-options ul li,
.amount-options ul li {
padding: 0;
}
/* --- Subheaders --- */
#radiobuttons-table-header,
#paymenttype-table-header {
display: block;
margin-bottom: 6px;
text-align: center;
font-weight: bold;
}
/* --- Commmon button styles --- */
.frequency-options input[type="radio"],
.amount-options input[type="radio"] {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
border: 0;
clip: rect(0 0 0 0);
}
.frb-btn,
.payment-method-button {
display: flex;
justify-content: center;
align-content: center;
align-items: center;
flex-wrap: wrap;
text-align: center;
height: 50px;
padding: 0 2px;
border-radius: 2px;
font-family: inherit;
font-weight: 500;
line-height: 1.2;
cursor: pointer;
transition: background-color 100ms, color 100ms, border-color 100ms, box-shadow 100ms;
background-color: #f8f9fa;
color: #222;
border: 1px solid #a2a9b1;
}
.frb-btn:hover {
background-color: #fff;
color: #444;
border-color: #a2a9b1;
}
.frb-btn:active {
background-color: #c8ccd1;
color: #000;
border-color: #72777d;
box-shadow: none;
}
input[type="radio"]:checked + .frb-btn {
background-color: #2a4b8d;
color: #fff;
border-color: #2a4b8d;
}
@media screen and (forced-colors: active) {
input[type="radio"]:checked + .frb-btn {
background-color: Highlight;
}
}
.frb-btn:focus,
.payment-method-button:focus {
outline: 0;
border-color: #36c;
box-shadow: inset 0 0 0 1px #36c;
}
input[type="radio"]:focus + .frb-btn,
input[type="radio"]:checked + .frb-btn:focus {
box-shadow: inset 0 0 0 1px #36c, inset 0 0 0 2px #fff;
}
.payment-method-button {
color: #36c;
}
.payment-method-button:hover {
background-color: #fff;
border-color: #447ff5;
}
.payment-method-button:active {
background-color: #eff3fa;
color: #2a4b8d;
border-color: #2a4b8d;
box-shadow: none;
}
/* --- Donation Amounts --- */
.amount-options .frb-btn {
height: 60px;
font-size: 15px;
line-height: 1.2;
text-align: center;
}
/* Smaller font size for countries with v long amounts */
.country-CO .amount-options .frb-btn,
.country-CR .amount-options .frb-btn,
.country-KR .amount-options .frb-btn,
.country-PY .amount-options .frb-btn,
.country-VN .amount-options .frb-btn {
font-size: 13px;
}
.input_amount_other .frb-btn span {
display: block;
font-size: 12px;
line-height: 1;
margin-bottom: 2px;
white-space: normal;
text-align: center;
}
.input_amount_other input {
display: block;
width: 100%;
border: 1px solid #a2a9b1;
color: #222;
padding: 2px;
border-radius: 2px;
direction: ltr;
text-align: center;
font-family: inherit;
font-size: 16px; /* must be >=16px or mobile Safari zooms in when selected */
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
margin: 0 4px;
}
/* --- Opt-in and PTF input styles --- */
.lp-radio-wrapper,
.lp-checkbox-wrapper {
display: table;
}
.lp-radio,
.lp-checkbox {
display: table-cell;
vertical-align: top;
margin: 7px 8px 8px 2px;
cursor: pointer;
}
body.rtl .lp-radio,
body.rtl .lp-checkbox {
margin: 7px 2px 8px 8px;
}
.lp-radio-label,
.lp-checkbox-label {
display: table-cell;
vertical-align: top;
padding: 4px 0;
white-space: normal;
font-size: 14px;
line-height: 18px;
font-weight: normal;
cursor: pointer;
}
.lp-radio-label:hover,
.lp-radio:focus + .lp-radio-label,
.lp-radio:hover + .lp-radio-label,
.lp-checkbox-label:hover,
.lp-checkbox:focus + .lp-checkbox-label,
.lp-checkbox:hover + .lp-checkbox-label {
color: #36c;
text-decoration: none;
}
.lp-radio:disabled + .lp-radio-label,
.lp-checkbox:disabled + .lp-checkbox-label {
color: #a2a9b1;
}
/* --- Opt-in --- */
.optin-options legend {
padding: 0;
font-size: inherit;
font-weight: bold;
}
.optin-options ul {
list-style: none;
margin: 0;
padding: 0;
}
.optin-options li {
display: table;
}
.optin-smallprint {
clear: both;
font-size: 12px;
line-height: 14px;
margin-top: 8px;
}
.optin-no-prompt {
display: none;
margin: 0;
padding: 6px;
border: 2px solid #900;
border-radius: 2px;
font-size: 14px;
line-height: 18px;
font-weight: normal;
}
.optin-no-prompt.is-positive {
border-color: #14866d;
font-weight: bold;
}
.optin-no-prompt__yes { display: none; }
.optin-no-prompt__no { display: block; }
.optin-no-prompt.is-positive .optin-no-prompt__yes { display: block; }
.optin-no-prompt.is-positive .optin-no-prompt__no { display: none; }
/* --- PTF --- */
.ptf {
display: none;
}
/* --- Payment method buttons --- */
.payment-method-div {
padding: 4px 0;
}
/* Hide extra empty <p> tags between buttons */
.payment-method-div ~ p {
display: none;
}
.payment-method-button {
margin: 0;
width: 100%;
font-size: 17px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
overflow: hidden;
gap: 2px;
}
/* --- Infobox ("Where your donation goes") --- */
#infobox-wrapper {
font-size: 13px;
line-height: 1.4;
color: #54595d;
font-weight: normal;
margin-top: 8px
}
#infobox-wrapper .mw-heading2 {
font-size: 16px;
font-weight: bold;
color: inherit;
border: 0;
margin-bottom: 8px;
}
#infobox-wrapper h2 {
font-size: inherit;
}
/* --- Privacy and links --- */
#donate-footer {
width: 100%;
max-width: 948px;
margin: 24px auto;
text-align: left;
font-size: 13px;
line-height: 1.4;
color: #54595d;
}
/* RTL fix for footer.*/
[lang="ar"] #donate-footer,
[lang="he"] #donate-footer,
[lang="fa"] #donate-footer,
[lang="ur"] #donate-footer,
[lang="ps"] #donate-footer,
[lang="sd"] #donate-footer,
[lang="dv"] #donate-footer,
[lang="yi"] #donate-footer,
[lang="ckb"] #donate-footer {
text-align: start;
}
#donate-footer > div {
margin-bottom: 1em;
}
.form-info-links,
.form-info-links ul {
list-style: none;
margin: 0;
text-align: center;
font-size: 15px;
}
.form-info-links li {
display: inline-block;
}
.form-info-links a {
padding: 14px !important;
}
/* --- Footer --- */
.mw-footer {
display: none;
}
/* Credit card logos.
* Classes are added by https://donate.wikimedia.org/wiki/MediaWiki:DonationForm.js ---
*/
.paymentmethod-cc svg {
display: none;
}
.cctypes-vmad,
.cctypes-vmaj,
.cctypes-vmj,
.cctypes-vma,
.cctypes-vm,
.cctypes-CBvma,
.cctypes-vmar {
font-size: 0; /* Remove spacing between icons */
}
.cctypes-vmad .cc-logo-visa,
.cctypes-vmad .cc-logo-mastercard,
.cctypes-vmad .cc-logo-amex,
.cctypes-vmad .cc-logo-discover,
.cctypes-vmaj .cc-logo-visa,
.cctypes-vmaj .cc-logo-mastercard,
.cctypes-vmaj .cc-logo-amex,
.cctypes-vmaj .cc-logo-jcb,
.cctypes-vmj .cc-logo-visa,
.cctypes-vmj .cc-logo-mastercard,
.cctypes-vmj .cc-logo-jcb,
.cctypes-vma .cc-logo-visa,
.cctypes-vma .cc-logo-mastercard,
.cctypes-vma .cc-logo-amex,
.cctypes-vm .cc-logo-visa,
.cctypes-vm .cc-logo-mastercard,
.cctypes-CBvma .cc-logo-CB,
.cctypes-CBvma .cc-logo-visa,
.cctypes-CBvma .cc-logo-mastercard,
.cctypes-CBvma .cc-logo-amex,
.cctypes-vmar .cc-logo-visa,
.cctypes-vmar .cc-logo-mastercard,
.cctypes-vmar .cc-logo-amex,
.cctypes-vmar .cc-logo-rupay {
display: inline-block !important;
}
.paymentmethod-cc .cc-logo-rupay {
border: 0;
}
/* Logos - WP on top, WMF horizontal below */
#p-logo a {
/* Need explicit height for backgrounds for IE */
background: top 30% center/160px 24px url(https://donate.wikimedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg), top 70% center/160px 37px url(https://upload.wikimedia.org/wikipedia/donate/6/60/Wmf_logo_horiz_K.svg);
background-repeat: no-repeat;
margin-left: 8px;
}
/* Mobile styles */
@media (max-width: 981px) {
/* Text & Logo layout */
body.skin-vector-legacy #content {
margin: 0;
padding: 140px 24px 24px 24px;
}
#mw-panel, #p-logo, #p-logo a {
width: 100% !important;
height: 140px;
margin: 0;
}
#p-logo a {
margin-left: 0;
}
/* Hide appeal */
#appeal-wrapper {
display: none;
}
#form-wrapper {
padding: 16px;
}
/* Footer */
div#footer {
margin: 0;
}
}
@media (max-width: 721px) {
/* Stack appeal and form */
#appeal-wrapper {
flex-basis: 100%;
padding: 0;
}
}
@media (max-width: 501px) {
/* Appeal same width as form */
#appeal-wrapper {
max-width: 380px;
padding: 0;
}
body.skin-vector-legacy #content {
padding: 140px 8px 8px 8px;
}
#donate-footer {
max-width: 380px;
}
}
#country-confirm {
text-align: center;
margin-top: -12px;
padding: 4px 0;
border-bottom: 1px solid #a2a9b1;
margin-bottom: 8px;
font-size: 90%;
}
@media (min-width: 980px) {
#country-confirm {
margin-top: -18px;
}
}
/* -- Donate skin fixes -- */
body.skin-donate .mw-body-content {
padding: 0 24px 24px 24px;
}
body.skin-donate #p-logo a {
display: block;
}
body.skin-donate h2 {
font-size: 21px;
font-weight: normal;
margin-bottom: 0;
}
@media screen and (min-width: 982px) {
body.skin-donate .mw-body-content {
padding: 1.25em 1.5em 1.5em 1.5em;
}
body.skin-donate #main-wrapper {
margin-left: 200px;
width: auto;
}
body.skin-donate #p-logo a {
position: absolute;
display: block;
height: 160px;
width: 160px;
left: 16px;
}
}
/* === end of Template:Styles/Default.css === */
0jq9xof7jqxnb86tm841ap8cbxklbhv
MediaWiki:DonationForm.js
8
7993
42985
42938
2026-08-18T16:53:07Z
Pcoombe
5
replace .indexOf() with .includes()
42985
javascript
text/javascript
/* jshint strict:false */
/** MediaWiki:DonationForm.js - loaded on all donation forms
* TODO: lots of cleanup
*/
var donationForm = {};
donationForm.loadedTime = Date.now();
donationForm.extraData = {
'vw' : window.innerWidth,
'vh' : window.innerHeight
};
donationForm.country = mw.util.getParamValue('country').toUpperCase();
try {
donationForm.currency = document.forms.donateForm.currency_code.value;
} catch (error) {
donationForm.currency = 'USD';
}
/**
* Make language and country into a standard javascript Intl locale identifier
*
* @param {string} language
* @param {string} country
* @return {string} locale identifier e.g. en-GB
*/
donationForm.getLocale = function( language, country ) {
// Sometimes in email testing links the uselang is a variable contiaining %
// In that case fall back to English so locale code doesn't break form
if ( language.match('%') ) {
language = 'en';
}
// MediaWiki allows some language codes like en-gb, en-ca, pt-br
// We don't want these for a javascript locale, so drop anything after '-'
language = language.split('-')[0];
return language + '-' + country;
};
donationForm.locale = donationForm.getLocale( mw.config.get('wgPageContentLanguage'), donationForm.country );
// Don't offer recurring at all in these countries
donationForm.noRecurringCountries = [ 'AR', 'IN' ];
donationForm.noRecurringPaypalCountries = [ 'CL', 'CO', 'PE', 'UY', 'BR' ];
donationForm.currencyRates = {
// From https://github.com/wikimedia/wikimedia-fundraising-SmashPig/blob/master/PaymentData/ReferenceData/CurrencyRates.php
// Updated 2025-11-03
'ADF' : 5.69,
'ADP' : 144,
'AED' : 3.67,
'AFA' : 66,
'AFN' : 66,
'ALL' : 83,
'AMD' : 374,
'ANG' : 1.79,
'AOA' : 912,
'AON' : 912,
'ARS' : 1457,
'ATS' : 12,
'AUD' : 1.53,
'AWG' : 1.79,
'AZM' : 8500,
'AZN' : 1.7,
'BAM' : 1.7,
'BBD' : 2,
'BDT' : 121,
'BEF' : 35,
'BGL' : 1.7,
'BGN' : 1.7,
'BHD' : 0.37401652162054,
'BIF' : 2923,
'BMD' : 1,
'BND' : 1.3,
'BOB' : 6.76,
'BRL' : 5.37,
'BSD' : 1,
'BTN' : 89,
'BWP' : 13,
'BYR' : 34102,
'BZD' : 1.98,
'CAD' : 1.4,
'CDF' : 2224,
'CHF' : 0.80650783228772,
'CLP' : 940,
'CNY' : 7.12,
'COP' : 3853,
'CRC' : 496,
'CUC' : 1,
'CUP' : 25,
'CVE' : 96,
'CYP' : 0.50784522451156,
'CZK' : 21,
'DEM' : 1.7,
'DJF' : 178,
'DKK' : 6.48,
'DOP' : 64,
'DZD' : 130,
'ECS' : 24094,
'EEK' : 14,
'EGP' : 47,
'ESP' : 144,
'ETB' : 153,
'EUR' : 0.86770508259643,
'FIM' : 5.16,
'FJD' : 2.27,
'FKP' : 0.76116218937783,
'FRF' : 5.69,
'GBP' : 0.76116218937783,
'GEL' : 2.68,
'GHC' : 108957,
'GHS' : 11,
'GIP' : 0.76116218937783,
'GMD' : 71,
'GNF' : 8637,
'GRD' : 296,
'GTQ' : 7.55,
'GYD' : 205,
'HKD' : 7.77,
'HNL' : 26,
'HRK' : 6.54,
'HTG' : 130,
'HUF' : 336,
'IDR' : 16671,
'IEP' : 0.68337328567002,
'ILS' : 3.25,
'INR' : 89,
'IQD' : 1292,
'IRR' : 42020,
'ISK' : 126,
'ITL' : 1680,
'JMD' : 159,
'JOD' : 0.70900000000001,
'JPY' : 154,
'KES' : 128,
'KGS' : 87,
'KHR' : 3971,
'KMF' : 427,
'KPW' : 135,
'KRW' : 1429,
'KWD' : 0.30641816376358,
'KYD' : 0.83333299999999,
'KZT' : 526,
'LAK' : 21568,
'LBP' : 89680,
'LKR' : 303,
'LRD' : 182,
'LSL' : 17,
'LTL' : 3,
'LUF' : 35,
'LVL' : 0.60982660286911,
'LYD' : 5.44,
'MAD' : 9.19,
'MDL' : 17,
'MGA' : 4474,
'MGF' : 9150,
'MKD' : 53,
'MMK' : 2093,
'MNT' : 2620,
'MOP' : 8.01,
'MRO' : 395,
'MTL' : 0.37250579195865,
'MUR' : 45,
'MVR' : 15,
'MWK' : 1730,
'MXN' : 19,
'MYR' : 4.2,
'MZM' : 63200,
'MZN' : 63,
'NAD' : 17,
'NGN' : 1446,
'NIO' : 36,
'NLG' : 1.91,
'NOK' : 10,
'NPR' : 141,
'NZD' : 1.75,
'OMR' : 0.38352905117543,
'PAB' : 1,
'PEN' : 3.35,
'PGK' : 4.17,
'PHP' : 59,
'PKR' : 282,
'PLN' : 3.69,
'PTE' : 174,
'PYG' : 6991,
'QAR' : 3.6,
'ROL' : 44083,
'RON' : 4.41,
'RSD' : 101,
'RUB' : 81,
'RWF' : 1446,
'SAR' : 3.75,
'SBD' : 8.21,
'SCR' : 14,
'SDD' : 59715,
'SDG' : 597,
'SDP' : 2261,
'SEK' : 9.49,
'SGD' : 1.3,
'SHP' : 0.76116218937783,
'SIT' : 208,
'SKK' : 26,
'SLL' : 19750,
'SOS' : 550,
'SRD' : 39,
'SRG' : 38521,
'STD' : 21169,
'SVC' : 8.75,
'SYP' : 513,
'SZL' : 17,
'THB' : 32,
'TJS' : 9.15,
'TMM' : 16757,
'TMT' : 3.35,
'TND' : 2.93,
'TOP' : 2.4,
'TRL' : 42048152,
'TRY' : 42,
'TTD' : 6.69,
'TWD' : 31,
'TZS' : 2442,
'UAH' : 42,
'UGX' : 3463,
'USD' : 1,
'UYU' : 40,
'UZS' : 11982,
'VEB' : 22204414173,
'VEF' : 22204414,
'VND' : 26302,
'VUV' : 112,
'WST' : 2.71,
'XAF' : 569,
'XAG' : 0.020582109674161,
'XAU' : 0.000249595454823,
'XCD' : 2.7,
'XEU' : 0.86770508259643,
'XOF' : 569,
'XPD' : 0.00068810810716198,
'XPF' : 104,
'XPT' : 0.00063604563466001,
'YER' : 238,
'YUN' : 101,
'ZAR' : 17,
'ZMK' : 5176,
'ZWD' : 373
};
/* Amount and currency formatting */
let formatters = {
// Amounts without currency symbol
amountFraction: new Intl.NumberFormat( donationForm.locale,
{ minimumFractionDigits: 2, maximumFractionDigits: 2 }
),
amountWhole: new Intl.NumberFormat( donationForm.locale,
{}
)
};
// currencyDisplay: 'narrowSymbol' fixes some issues like en-CO showing the ISO code
// but browser support is lacking, so wrap in a try/catch
try {
formatters.currencyFraction = new Intl.NumberFormat( donationForm.locale,
{ style: 'currency', currency: donationForm.currency, currencyDisplay: 'narrowSymbol' }
);
formatters.currencyWhole = new Intl.NumberFormat( donationForm.locale,
{ style: 'currency', currency: donationForm.currency, currencyDisplay: 'narrowSymbol', minimumFractionDigits: 0 }
);
} catch(e) {
formatters.currencyFraction = new Intl.NumberFormat( donationForm.locale,
{ style: 'currency', currency: donationForm.currency }
);
formatters.currencyWhole = new Intl.NumberFormat( donationForm.locale,
{ style: 'currency', currency: donationForm.currency, minimumFractionDigits: 0 }
);
}
donationForm.formatCurrency = function( amount ) {
if ( amount % 1 !== 0 ) { // Not a whole number
return formatters.currencyFraction.format( amount );
} else {
return formatters.currencyWhole.format( amount );
}
};
donationForm.formatAmount = function( amount ) {
var formatterOptions, output;
if ( amount % 1 !== 0 ) { // Not a whole number
return formatters.amountFraction.format( amount );
} else {
return formatters.amountWhole.format( amount );
}
};
/* Localize the amount errors. Call when initialising form. */
donationForm.localizeErrors = function() {
var currency = donationForm.currency;
$('.lp-error-smallamount').text( function( index, oldText ) {
return oldText.replace( '$1', donationForm.formatAmount( donationForm.minLocal ) + '\xa0' + currency );
});
if ( currency === 'USD' ) {
// we don't need to include the conversion
$('.lp-error-bigamount').text( function( index, oldText ) {
return oldText.replace( '($1 $2) ', '' )
.replace( '($1 $2) ', '' );
});
}
$('.lp-error-bigamount').text( function( index, oldText ) {
return oldText.replace( '$1', donationForm.formatAmount( donationForm.maxLocal ) )
.replace( '$2', currency )
.replace( '$3', 'benefactors@wikimedia.org' )
.replace( '$4', donationForm.formatAmount( donationForm.maxUSD ) );
});
};
function adjustMinAmounts() {
// Amounts spreadsheet https://docs.google.com/spreadsheets/d/1oJGy5ZxBL0HYl5pwbEORkl_VXy3SEjmT7ZOVYQdBsXQ/edit?gid=1360915542#gid=1360915542
// Defining lookup table here. Using mw.loader.getScript was visibly too slow for the user (amounts flashing)
const minPlusLookup = {
// US - Canada - UK - EUR - Australia - New Zealand
// https://docs.google.com/spreadsheets/d/1oJGy5ZxBL0HYl5pwbEORkl_VXy3SEjmT7ZOVYQdBsXQ/edit?gid=1360915542#gid=1360915542
USD: {
amount1: { from: 2.75, to: 4.50 },
amount2: { from: 5, to: 7 },
},
GBP: {
amount1: { from: 2, to: 4 },
amount2: { from: 5, to: 7 },
},
EUR: {
amount1: { from: 2.50, to: 4.50 },
amount2: { from: 5, to: 7 },
},
// English Bundle
// https://docs.google.com/spreadsheets/d/1oJGy5ZxBL0HYl5pwbEORkl_VXy3SEjmT7ZOVYQdBsXQ/edit?gid=891721479#gid=891721479
HUF: {
amount1: { from: 500, to: 750 },
},
MYR: {
amount1: { from: 10, to: 20 },
amount2: { from: 30, to: 40 },
},
RON: {
amount1: { from: 10, to: 30 },
},
// Other
// https://docs.google.com/spreadsheets/d/1oJGy5ZxBL0HYl5pwbEORkl_VXy3SEjmT7ZOVYQdBsXQ/edit?gid=1865233115#gid=1865233115
CZK: {
amount1: { from: 50, to: 100 },
amount2: { from: 100, to: 150 },
},
DKK: {
amount1: { from: 20, to: 40 },
amount2: { from: 75, to: 80 },
},
JPY: {
amount1: { from: 500, to: 1000 },
amount2: { from: 1000, to: 2000 },
amount3: { from: 2000, to: 3000 },
amount4: { from: 2500, to: 4000 },
amount5: { from: 4000, to: 5000 },
amount6: { from: 5000, to: 10000 },
amount7: { from: 10000, to: 15000 },
},
ZAR: {
amount1: { from: 30, to: 50 },
amount2: { from: 50, to: 75 },
},
NOK: {
amount1: { from: 30, to: 50 },
},
SEK: {
amount1: { from: 30, to: 50 },
amount2: { from: 50, to: 70 },
},
ILS: {
amount1: { from: 10, to: 20 },
},
PLN: {
amount1: { from: 10, to: 20 },
amount2: { from: 20, to: 30 },
},
CHF: {
amount1: { from: 20, to: 30 },
},
THB: {
amount1: { from: 100, to: 150 },
amount2: { from: 200, to: 250 },
},
};
// CAD, AUD, NZD = USD amounts
minPlusLookup.CAD = minPlusLookup.USD;
minPlusLookup.AUD = minPlusLookup.USD;
minPlusLookup.NZD = minPlusLookup.USD;
if ( mw.util.getParamValue( 'minPlus' ) === '1' || mw.util.getParamValue( 'minPlus' ) === 'true' ) {
const currencyEntry = minPlusLookup[ donationForm.currency ];
// Currency not in lookup table. No swapping.
if ( !currencyEntry ) return null;
const amountKeys = Object.keys( currencyEntry ); // ["amount1", "amount2"] or however many keys in lookup
amountKeys.forEach( (amount, index) => {
const $radio = $( `#input_amount_${index}` );
const $label = $( `label[for='input_amount_${index}` );
// If the button's amount is equal to "from" in the lookup, perform the swap.
// Guards from hpc adjusted amounts as those values won't be present in the lookup.
if ( currencyEntry[amount].from === parseFloat( $radio.val() ) ) {
$radio.val( currencyEntry[amount].to );
$label.text( donationForm.formatCurrency( currencyEntry[amount].to ) );
}
});
}
}
function adjustHPC() {
/* Adjust amounts based on highest previous contribution (hpc)
or most recent contribution (mrc) parameter. Used for emails.
TODO: split data out? */
var hpcSet = mw.util.getParamValue('hpcSet');
// Look for 'hpc' parameter, then 'mrc'
var hpc = parseFloat( mw.util.getParamValue('hpc') );
if( isNaN(hpc) ) {
hpc = parseFloat( mw.util.getParamValue('mrc') );
if( isNaN(hpc) ) {
if ( hpcSet ) {
// Allow using hpcSet even without hpc, for MG appeals
hpc = 0;
} else {
return;
}
}
}
var currency = donationForm.currency;
// https://phabricator.wikimedia.org/T381437
var hpcCurrency = mw.util.getParamValue('hpcCurrency');
if ( hpcCurrency && hpcCurrency !== currency ) {
console.log('Highest previous contribution currency does not match form currency, using default amounts');
return;
}
// Consult this sheet for amounts: https://docs.google.com/spreadsheets/d/1oJGy5ZxBL0HYl5pwbEORkl_VXy3SEjmT7ZOVYQdBsXQ/edit?gid=1360915542#gid=1360915542
var radioAmountsData = {
"USD" : { // also used for CAD, AUD, NZD
"default" : [
[ 0, [ 2.75, 5, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_Annual" : [
[ 0, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 5, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 10, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus" : [
[ 0, [ 4.50, 7, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus5-50" : [
[ 0, [ 5.50, 7, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus6" : [
[ 0, [ 6, 10, 15, 20, 25, 35, 50 ] ],
[ 5, [ 8, 12, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_AvgGiftPlus" : [
[ 0, [ 2.75, 5, 10, 15, 20, 35, 50 ] ],
[ 5, [ 5, 10, 20, 25, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 35, 40, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 40, 50, 100, 150 ] ],
[ 25, [ 25, 35, 50, 60, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
// Direct Mail - fixed amounts
"directmail" : [
[ 0, [ 25, 35, 50, 100, 150, 250, 300 ] ]
],
"directmail250" : [
[ 0, [ 250, 300, 500, 750, 1000, 2500, 5000 ] ]
]
},
"EUR" : {
"default" : [
[ 0, [ 2.50, 5, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_Annual" : [
[ 0, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 5, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 10, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus" : [
[ 0, [ 4.50, 7, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus5-50" : [
[ 0, [ 5.50, 7, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus6" : [
[ 0, [ 6, 10, 15, 20, 25, 35, 50 ] ],
[ 5, [ 8, 12, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_AvgGiftPlus" : [
[ 0, [ 2.50, 5, 10, 15, 20, 35, 50 ] ],
[ 5, [ 5, 10, 20, 25, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 35, 40, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 40, 50, 100, 150 ] ],
[ 25, [ 25, 35, 50, 60, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
},
"GBP" : {
"default" : [
[ 0, [ 2, 5, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_Annual" : [
[ 0, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 5, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 10, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus" : [
[ 0, [ 4, 7, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus5-50" : [
[ 0, [ 5, 7, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus6" : [
[ 0, [ 6, 10, 15, 20, 25, 35, 50 ] ],
[ 5, [ 8, 12, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_AvgGiftPlus" : [
[ 0, [ 2, 5, 10, 15, 20, 35, 50 ] ],
[ 5, [ 5, 10, 20, 25, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 35, 40, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 40, 50, 100, 150 ] ],
[ 25, [ 25, 35, 50, 60, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
},
"JPY" : [
[ 0, [ 500, 1000, 2000, 2500, 4000, 5000, 10000 ] ],
[ 1000, [ 1000, 1500, 2500, 4000, 5000, 10000, 15000 ] ],
[ 1500, [ 1500, 2000, 3000, 4000, 5000, 10000, 15000 ] ],
[ 2000, [ 2000, 2500, 3500, 5000, 7500, 10000, 25000 ] ],
[ 2500, [ 2500, 3500, 5000, 7500, 10000, 15000, 25000 ] ],
[ 3000, [ 3000, 4000, 5000, 7500, 10000, 15000, 25000 ] ],
[ 5000, [ 5000, 10000, 15000, 20000, 35000, 50000, 100000 ] ],
[ 10000, [ 10000, 25000, 50000, 75000, 100000, 150000, 200000 ] ]
],
"SEK" : [
[ 0, [ 30, 50, 100, 150, 200, 300, 500 ] ],
[ 50, [ 50, 100, 150, 200, 300, 500, 750 ] ],
[ 200, [ 200, 300, 500, 750, 1000, 1500, 2000 ] ]
]
};
radioAmountsData.AUD = radioAmountsData.USD;
radioAmountsData.CAD = radioAmountsData.USD;
radioAmountsData.NZD = radioAmountsData.USD;
// Major gifts appeals, hacky but this is easier than adding a load of new forms to maintain
var currencyList = [ 'USD', 'CAD', 'AUD', 'NZD', 'GBP', 'EUR' ]; // close enough
for ( let i = 0; i < currencyList.length; i++ ) {
// FY2425 hpcSets
// Major Gifts hpcSets
radioAmountsData[ currencyList[i] ].MG_2024_500 = [ [ 0, [ 500, 750, 1000, 1250, 1500, 1750, 2000 ] ] ];
radioAmountsData[ currencyList[i] ].MG_2024_650 = [ [ 0, [ 650, 750, 1000, 1250, 1500, 1750, 2000 ] ] ];
// FY2526 hpcSets
// Direct Mail hpcSets
radioAmountsData[ currencyList[i] ].DM_2526_15 = [ [ 0, [ 15, 25, 35, 50, 100, 200, 250 ] ] ];
radioAmountsData[ currencyList[i] ].DM_2526_250 = [ [ 0, [ 250, 300, 500, 750, 1000, 2500, 5000 ] ] ];
radioAmountsData[ currencyList[i] ].DM_2526_5000 = [ [ 0, [ 5000, 7500, 10000, 12500, 15000, 17500, 20000 ] ] ];
// Major Gifts hpcSets
radioAmountsData[ currencyList[i] ].MG_2526_500_9999 = [
[ 0, [ 750, 850, 1000, 1250, 1500, 1750, 2000 ] ],
[ 1000, [ 1500, 2000, 2500, 3000, 3750, 4500, 5000 ] ],
[ 3000, [ 4000, 5000, 6000, 7000, 8000, 9000, 10000 ] ]
];
radioAmountsData[ currencyList[i] ].MG_2526_10K = [ [ 0, [ 5000, 7500, 10000, 12500, 15000, 17500, 20000 ] ] ];
radioAmountsData[ currencyList[i] ].MG_2526_250_399 = [ [ 0, [ 500, 750, 1000, 1250, 1500, 1750, 2000 ] ] ];
radioAmountsData[ currencyList[i] ].MG_2526_400_499 = [ [ 0, [ 650, 750, 1000, 1250, 1500, 1750, 2000 ] ] ];
radioAmountsData[ currencyList[i] ].MG_2526_HNWI_250 = [ [ 0, [ 250, 300, 500, 750, 1000, 2500, 5000 ] ] ];
radioAmountsData[ currencyList[i] ].MG_2526_HNWI_350 = [ [ 0, [ 350, 400, 500, 750, 1000, 2500, 5000 ] ] ];
radioAmountsData[ currencyList[i] ].MG_2526_2500 = [ [ 0, [ 2500, 3000, 5000, 7500, 10000, 15000, 25000 ] ] ];
}
var appealAmountsData = {
"USD" : [ // also used for CAD, AUD, NZD, GBP, EUR
[ 0, [ 5, 10, 20 ] ],
[ 10, [ 10, 20, 50 ] ],
[ 20, [ 20, 30, 50 ] ],
[ 35, [ 20, 30, 50 ] ],
[ 50, [ 20, 50, 100 ] ],
[ 75, [ 50, 75, 100 ] ],
[ 100, [ 75, 100, 150 ] ],
[ 150, [ 75, 100, 200 ] ],
[ 200, [ 100, 200, 300 ] ]
],
"JPY" : [
[ 0, [ 300, 500, 1000 ] ],
[ 3, [ 500, 1000, 1500 ] ],
[ 5, [ 1000, 1500, 2000 ] ],
[ 10, [ 1500, 2000, 5000 ] ],
[ 20, [ 2000, 3000, 5000 ] ],
[ 50, [ 2000, 5000, 10000 ] ],
[ 100, [ 5000, 10000, 15000 ] ]
],
"SEK" : [
[ 0, [ 20, 50, 100 ] ],
[ 3, [ 30, 50, 100 ] ],
[ 5, [ 50, 100, 150 ] ],
[ 15, [ 100, 150, 200 ] ],
[ 23, [ 100, 200, 300 ] ],
[ 38, [ 100, 200, 500 ] ],
[ 75, [ 100, 500, 750 ] ],
[ 112, [ 100, 500, 1000 ] ]
]
};
appealAmountsData.AUD = appealAmountsData.USD;
appealAmountsData.CAD = appealAmountsData.USD;
appealAmountsData.GBP = appealAmountsData.USD;
appealAmountsData.NZD = appealAmountsData.USD;
appealAmountsData.EUR = appealAmountsData.USD;
// Radio button amounts
var radioAmounts = pickAmountArray( radioAmountsData, currency, hpc, hpcSet );
if ( radioAmounts.length ) {
donationForm.setAmountOptions( radioAmounts );
}
// Appeal amounts
var appealAmounts = pickAmountArray( appealAmountsData, currency, hpc, hpcSet );
if ( appealAmounts.length ) {
var appealAmountString = appealAmounts.map( donationForm.formatCurrency ).join( ', ');
$('.consider-amounts').html(appealAmountString);
}
}
function pickAmountArray( data, currency, hpc, hpcSet ) {
/**
* Choose the amounts for radio buttons / appeal based on hpc
* @param {Object} data
* @param {String} currency
* @param {Number} hpc
* @param {String} hpcSet
* @return {Array} Array of amounts (as numbers)
*/
var set, amounts;
if ( !(currency in data) ) {
return [];
}
if ( $.isArray(data[currency]) ) {
// No variant sets
set = data[currency];
} else {
// We need to go deeper. Check the variants.
if ( hpcSet in data[currency] ) {
set = data[currency][hpcSet];
} else {
set = data[currency]['default'];
}
}
// Find correct amount array for this hpc
for (var i = 0; i < set.length; i++) {
if ( set[i][0] > hpc ) {
break;
}
amounts = set[i][1];
}
return amounts;
}
function preSelect() {
/* Check for a 'preSelect' url parameter, and select that option.
If there isn't an option, add it to the "Other" box and select that */
var preSelectAmount = parseFloat( mw.util.getParamValue('preSelect') || mw.util.getParamValue('preselect') );
if ( preSelectAmount > 0 ) {
let hpcCurrency = mw.util.getParamValue('hpcCurrency');
if ( hpcCurrency && hpcCurrency !== donationForm.currency ) {
console.log('Highest previous contribution currency does not match form currency, not doing preselection');
return;
}
var $preSelectOption = $('input[name="amount"][value="' + preSelectAmount + '"]');
if ( $preSelectOption.length ) {
// Select existing input
$preSelectOption.prop('checked', true);
} else {
$('#input_amount_other_box').val( preSelectAmount );
$('#input_amount_other').prop('checked', true);
}
donationForm.updateFeeDisplay();
}
}
function preSelectBox() {
/* Check for a 'preSelectBox' url parameter, and select that numbered option.
If the value provided is invalid or doesn't exist, exit. Valid choices are 1 to 7 (8 is "Other").
If 'preSelect' exists, ignore this function. */
if(!mw.util.getParamValue('preSelect')){
// Check hpcCurrency first before running preselection.
let hpcCurrency = mw.util.getParamValue('hpcCurrency');
if ( hpcCurrency && hpcCurrency !== donationForm.currency ) {
console.log('Highest previous contribution currency does not match form currency, not preselecting box.');
return;
}
// If hpc & hpcCurrency provided are okay OR hpc wasn't provided then continue.
var preSelectBoxNumber = parseInt( mw.util.getParamValue('preSelectBox') );
if (preSelectBoxNumber >= 1 && preSelectBoxNumber <= 7) {
var $preSelectOption = $('input[id="input_amount_' + (preSelectBoxNumber - 1) + '"]');
if ( $preSelectOption.length ) {
$preSelectOption.prop('checked', true);
donationForm.updateFeeDisplay();
}
}
}
}
function addCardTypesClass(country) {
/**
* Add card types class to credit card button, so we can show correct logos
* Banner equivalent: https://meta.wikimedia.org/wiki/MediaWiki:FundraisingBanners/LocalizeJS-2017.js
* @param {String} country ISO code
*/
var cardTypes = {
// Big 6
'US' : 'vmad',
'CA' : 'vma',
'GB' : 'vmaj',
'IE' : 'vmaj',
'AU' : 'vmaj',
'NZ' : 'vma',
// Euro countries
'AT' : 'vmaj',
'BE' : 'vmaj',
'ES' : 'vmaj',
'FR' : 'vma',
'IT' : 'vmaj',
'LU' : 'vmaj',
'LV' : 'vma',
'NL' : 'vmaj',
'PT' : 'vmaj',
'SK' : 'vmaj',
'GR' : 'vma',
// Others
'CZ' : 'vmad',
'DK' : 'vma',
'HU' : 'vma',
'IL' : 'vmad',
// 'JP' : 'vmaj', - use text only as there were complaints about Diners Club not being included
'MY' : 'vmaj',
'NO' : 'vma',
'PL' : 'vma',
'RO' : 'vma',
'SE' : 'vma',
'UA' : 'vma',
'ZA' : 'vm',
'ZZ' : 'vmad' // For testing
};
if ( cardTypes[country] ) {
$('.paymentmethod-cc').addClass('cctypes-' + cardTypes[country] );
$('.cc-text-label').addClass('sr-only');
}
}
/* Form functions */
function clearOther(box) {
document.getElementById('input_amount_other').checked = true;
box.value = "";
}
function selectOther() {
document.getElementById('input_amount_other').checked = true;
}
function selectAmount() {
$('#input_amount_other_box').val('');
}
/* -- Moved from Template:2012FR/Form-section/Processing/Default -- */
/**
* Validate form, and prep most of the parameters
*
* @param {string} paymentMethod - method e.g. 'cc', 'paypal'
* @param {string} paymentSubMethod - submethod e.g. 'rtbt_ideal' (a submethod of 'rtbt')
* @param {string} skipAmountValidation - skip validating amount for PayPal forced to USD
*/
donationForm.redirectPayment = function( paymentMethod, paymentSubMethod, skipAmountValidation ) {
if ( donationForm.validate( skipAmountValidation ) ) {
var params = {};
params.currency = donationForm.currency;
params.country = donationForm.country;
// Overrides for specific gateways
if ( paymentMethod === 'cc-adyen' ) {
params.payment_method = 'cc';
params.gateway = 'adyen';
} else if ( paymentMethod === 'cc-dlocal' ) {
params.payment_method = 'cc';
params.gateway = 'dlocal';
} else if ( paymentMethod === 'trustly' ) {
params.payment_method = 'dd';
params.payment_submethod = 'ach';
params.gateway = 'gravy';
} else if ( paymentSubMethod === 'sepadirectdebit' ) {
params.payment_method = 'rtbt';
params.payment_submethod = 'sepadirectdebit';
params.gateway = 'gravy';
} else if ( paymentMethod === 'bt' && params.country === 'CZ' ) {
params.payment_method = 'bt';
params.gateway = 'gravy';
} else if ( paymentSubMethod === 'vipps' ) {
params.payment_method = 'ew';
params.payment_submethod = 'vipps';
params.gateway = 'gravy';
} else {
params.payment_method = paymentMethod;
}
// dlocal
let dlocalCountries = [ 'AR', 'BR', 'CL', 'CO', 'MX', 'PE', 'UY', 'ZA' ],
dlocalMethods = [ 'cc', 'bt', 'cash', 'cash_boleto', 'pix' ];
if ( dlocalCountries.includes( params.country ) && dlocalMethods.includes( params.payment_method ) ) {
params.gateway = 'gravy';
}
if ( params.payment_method === 'cc' && params.gateway === undefined ) {
params.gateway = 'gravy';
}
if ( params.payment_method === 'paypal' ) {
params.gateway = 'gravy';
}
if ( params.payment_method === 'rtbt' && paymentSubMethod === 'rtbt_ideal' ) {
params.gateway = 'gravy';
}
if ( params.payment_method === 'apple' || params.payment_method === 'google' ) {
params.gateway = 'gravy';
}
if ( paymentSubMethod ) {
params.payment_submethod = paymentSubMethod;
}
let frequency = donationForm.getFrequency();
if ( frequency === 'monthly' ) {
params.recurring = '1';
params.frequency_unit = 'month';
} else if ( frequency === 'annual' ) {
params.recurring = '1';
params.frequency_unit = 'year';
}
params.uselang = mw.config.get('wgPageContentLanguage'); // see T281285 for why not wgUserLanguage
if ( params.uselang === 'pt' && params.country === 'BR' ) {
params.uselang = 'pt-br';
}
if ( params.uselang === 'es' &&
( params.country === 'AR' || params.country === 'CL' ||
params.country === 'CO' || params.country === 'MX' ||
params.country === 'PE' || params.country === 'UY' ||
params.country === 'US' )
) {
params.uselang = 'es-419';
}
var amount = donationForm.getAmount();
if ( $('#ptf-checkbox').prop('checked') ) {
amount = amount + donationForm.calculateFee( amount );
donationForm.extraData.ptf = 1;
}
params.amount = amount;
// Email optin
if ( $('input[name="opt_in"]').length > 0 ) {
var opt_inValue = $('input[name="opt_in"]:checked').val();
params.opt_in = opt_inValue; // donationForm.validate() already checked it's 1 or 0
}
if ( mw.util.getParamValue( 'pym_variant' ) ) {
params.variant = mw.util.getParamValue( 'pym_variant' );
}
if ( params.recurring && params.variant && params.variant.match( /monthlyConvert/ ) ) {
// Post-payments monthly convert makes no sense if it's already recurring
// Avoid things like T312905
delete params.variant;
}
if ( mw.util.getParamValue( 'pym_appeal' ) ) {
params.appeal = mw.util.getParamValue( 'pym_appeal' );
}
// Pass through specified parameters to payments unchanged
const passThroughParams = [
'contact_id', 'contact_hash', // https://phabricator.wikimedia.org/T381405
'checksum', 'contribution_recur_id', // https://phabricator.wikimedia.org/T396271
'recipient_id', // SMS
'app_install_id' // https://phabricator.wikimedia.org/T411535
];
passThroughParams.forEach( ( param ) => {
const value = mw.util.getParamValue( param );
if ( value ) {
params[ param ] = value;
}
} );
// Monthly convert
if ( mc ) { // check just in-case this wasn't loaded for some reason
mc.main( params, donationForm.finalStep );
} else {
donationForm.finalStep( params );
}
} else {
donationForm.extraData.validateError = 1; // Flag they had an error, even if fixed later
}
return false; // don't submit if called by a button
};
/**
* Build final tracking parameters, and submit to payments
* @param {Object} params
*/
donationForm.finalStep = function( params ) {
var url = new URL('https://payments.wikimedia.org/index.php/Special:GatewayChooser');
// Skip form chooser for Venmo
if ( params.payment_method === 'venmo' ) {
url = new URL('https://payments.wikimedia.org/index.php/Special:GravyGateway');
}
// Skip form chooser for Pix
if ( params.payment_method === 'cash' && params.payment_submethod === 'pix' ) {
url = new URL('https://payments.wikimedia.org/index.php/Special:GravyGateway');
}
// And Yape
if ( params.payment_method === 'ew' && params.payment_submethod === 'yape' ) {
url = new URL('https://payments.wikimedia.org/index.php/Special:GravyGateway');
}
donationForm.extraData.time = Math.round( (Date.now() - donationForm.loadedTime)/1000 );
// Tracking data
params.wmf_medium = mw.util.getParamValue( 'wmf_medium' ) || mw.util.getParamValue( 'utm_medium' );
params.wmf_campaign = mw.util.getParamValue( 'wmf_campaign' ) || mw.util.getParamValue( 'utm_campaign' );
params.wmf_source = donationForm.buildTrackingSource( params );
params.wmf_key = donationForm.buildTrackingKey( donationForm.extraData );
if ( document.referrer ) { // TODO: do we need this?
// Strip protocol to stop firewall complaining
params.referrer = document.referrer.replace(/https?:\/\//i, '');
}
for ( var key of Object.keys( params ) ) {
url.searchParams.set( key, params[key] );
}
if ( window.top !== window.self ) {
// In a frame, open payments in a new tab
window.open( url.toString() );
} else {
window.location.href = url.toString();
}
};
/**
* Build a wmf_source value, including the landing page info.
*
* Own function so it can be overriden for weird tests
*
* @param {Object} params
* @return {string} wmf_source
*/
donationForm.buildTrackingSource = function( params ) {
var wmf_source = mw.util.getParamValue( 'wmf_source' ) || mw.util.getParamValue( 'utm_source' );
wmf_source += '.';
var fullDottedPaymentMethod = params.payment_method;
if ( params.recurring ) {
fullDottedPaymentMethod = 'r' + fullDottedPaymentMethod;
}
if ( params.payment_submethod ) {
fullDottedPaymentMethod = fullDottedPaymentMethod + '.' + params.payment_submethod;
}
/* Get URL parameter, but remove parts using old format. Allow fallback to a default value */
var getParam = function( param, removeText, dflt ) {
if ( mw.util.getParamValue( param ) ) {
return mw.util.getParamValue( param ).replace( removeText, '' );
} else {
return dflt;
}
};
/* The landing page info, separated by ~. This mostly exists for legacy reasons */
wmf_source += getParam( 'template' , 'Lp-layout' , 'default' ) + '~';
wmf_source += getParam( 'appeal-template' , 'Appeal-template-' , 'default' ) + '~';
wmf_source += getParam( 'appeal' , 'Appeal-' , 'default' ) + '~';
wmf_source += getParam( 'form-template' , 'Form-template-' , 'default' ) + '~';
wmf_source += getParam( 'form-countryspecific', 'Form-countryspecific-', 'control' );
wmf_source += '.' + fullDottedPaymentMethod;
return wmf_source;
};
/**
* Build a string for wmf_key from extra tracking data
*
* @param {Object} data
* @return {string} wmf_key
*/
donationForm.buildTrackingKey = function(data) {
var existingKey = mw.util.getParamValue( 'wmf_key' ) || mw.util.getParamValue( 'utm_key' ),
dataArray = [];
if ( existingKey ) {
dataArray.push( existingKey );
}
for (var key in data) {
if (data.hasOwnProperty(key)) {
dataArray.push( key + '_' + data[key] );
}
}
return dataArray.join('~');
};
/* Return amount selected or input */
donationForm.getAmount = function() {
var form = document.forms.donateForm,
amount = null;
donationForm.extraData.otherAmt = 0;
// 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 = parseFloat( form.amount[i].value );
}
}
}
// Check the "other" amount box
if ( document.getElementById('input_amount_other').checked ) {
amount = donationForm.parseOtherAmount( form.input_amount_other_box.value );
donationForm.extraData.otherAmt = 1;
}
return amount;
};
/**
* Parse Other field value into amount
*
* Does some awful regex stuff to rm symbols and turn the string into a number
* Remember some locales flip . & , for decimal point/thousands separator
*
* @param {string} value Value of "Other" field
* @return {float} Float with amount, or 0 if NaN
*/
donationForm.parseOtherAmount = function( value ) {
var amount;
value = value.replace(/[,.](\d)$/, '\:$10');
value = value.replace(/[,.](\d)(\d)$/, '\:$1$2');
value = value.replace(/[\$£€¥,.]/g, '');
value = value.replace(/:/, '.');
amount = parseFloat( value );
if ( isNaN( amount ) ) {
return 0;
} else {
return amount;
}
};
/**
* Validate the form.
*/
donationForm.validate = function( skipAmountValidation ) {
var error = false;
var form = document.forms.donateForm;
// Reset all errors
$('.lp-haserror').removeClass('lp-haserror');
$('.lp-error').hide();
if ( !skipAmountValidation && !donationForm.validateAmount() ) {
error = true;
}
if ( form.opt_in ) {
if ( $('input[name="opt_in"]:checked').val() === undefined ) {
$('#error-optin').show().focus();
error = true;
} else {
$('#error-optin').hide();
}
}
return !error;
};
/**
* Check if selected amount is valid i.e. a positive number, between minimum and maximum.
* If not, show an error and return false.
*/
donationForm.validateAmount = function() {
var amount = donationForm.getAmount();
if ( amount === null || isNaN(amount) || amount <= 0 || amount < donationForm.minLocal ) {
$('.amount-options').addClass('lp-haserror');
$('.lp-error-bigamount').hide();
$('.lp-error-smallamount').show().focus();
return false;
} else if ( amount > donationForm.maxLocal ) {
$('.amount-options').addClass('lp-haserror');
$('.lp-error-bigamount').show().focus();
return false;
} else {
$('.amount-options').removeClass('lp-haserror');
$('.lp-error-smallamount, .lp-error-bigamount').hide();
return true;
}
};
donationForm.getFrequency = function() {
return document.forms.donateForm.dataset.frequency || 'onetime';
};
donationForm.setFrequency = function( frequency ) {
// TODO: add some validation to reject invalid frequency values
let form = document.forms.donateForm;
form.frequency.value = frequency; // change input
form.dataset.frequency = frequency;
};
/* Wrapper for compatibility with old forms */
donationForm.toggleMonthly = function( monthly ) {
if ( monthly ) {
donationForm.setFrequency( 'monthly' );
} else {
donationForm.setFrequency( 'onetime' );
}
};
donationForm.updateFeeDisplay = function() {
var selectedAmount = donationForm.getAmount(),
feeAmount = donationForm.calculateFee( selectedAmount ),
feeText;
feeText = donationForm.formatCurrency( feeAmount );
$('.ptf label span').text( feeText );
if ( selectedAmount + feeAmount <= donationForm.maxLocal ) {
$('.ptf').slideDown();
}
};
/**
* Calculate approximate transaction fee on given amount
* @param {number} amount
* @return {number} Rounded to 2 decimal places
*/
donationForm.calculateFee = function( amount ) {
// Minimum fee/PTF amounts. Default is 0.35.
// Updated 2019-05-21 to approx 0.35 USD equivalent
var feeMinimums = {
'DKK' : 2,
'HUF' : 100,
'ILS' : 1.2,
'INR' : 4,
'JPY' : 35,
'KHR' : 1000,
'MYR' : 1,
'NOK' : 3,
'PLN' : 1.35,
'CZK' : 7.5,
'RON' : 1.5,
'SEK' : 3,
'UAH' : 10,
'ZAR' : 5,
// Latin America // Updated 2025-06-10 to approx 0.35 USD equivalent
'BRL' : 2,
'ARS' : 415,
'CLP' : 325,
'COP' : 1450,
'MXN' : 6.75,
'PEN' : 1.28,
'UYU' : 14.5
};
var feeMultiplier = 0.04,
feeMinimum = feeMinimums[ donationForm.currency ] || 0.35,
feeAmount = amount * feeMultiplier;
if ( feeAmount < feeMinimum ) {
feeAmount = feeMinimum;
}
return parseFloat( feeAmount.toFixed(2) );
};
donationForm.initOptin = function() {
$('.optin-options').on('change', function(e) {
$('#error-optin').hide();
// Only do all this if we have translated prompts
if ( $('.optin-no-prompt').data('is-translated') === 'yes' ) {
if ( e.target.id === 'optin-no' ) {
$('.optin-no-prompt').removeClass('is-positive');
if ( !$('.optin-no-prompt').is(':visible') ) {
$('.optin-no-prompt').slideDown();
}
} else {
$('.optin-no-prompt').addClass('is-positive');
}
}
});
};
/**
* Block typing letters and symbols in given input. Used for Other amount inputs
*
* If we don't do this, Safari allows typing them and then chokes on submit
* https://phabricator.wikimedia.org/T118741, https://phabricator.wikimedia.org/T173431
*
* @param {Element} inputElement The element to block typing on
*/
donationForm.otherInputControl = function( inputElement ) {
if ( inputElement ) {
inputElement.onkeypress = function(e) {
// Allow special keys in Firefox
if ((e.code == 'ArrowLeft') || (e.code == 'ArrowRight') ||
(e.code == 'ArrowUp') || (e.code == 'ArrowDown') ||
(e.code == 'Delete') || (e.code == 'Backspace')) {
return;
}
var chr = String.fromCharCode(e.which);
if ( '0123456789., '.includes(chr) ) {
return false;
}
};
}
};
/**
* Should we show Apple Pay?
*
* Note there is a ~500ms delay in Safari when checking, so only call this if needed
*
* @param {string} country
* @return {boolean}
*/
donationForm.shouldShowApplePay = function ( country ) {
if ( location.search.match('forceApplePay') ) {
return true;
}
if ( window.screen.width >= 640 && country !== 'JP' ) { // T397002
// On a desktop browser, people can scan with their iphone
return true;
} else if ( window.ApplePaySession ) {
// On mobile, check if Apple Pay is available natively
if ( ApplePaySession.canMakePayments() ) {
return true;
}
}
return false;
};
/**
* Determine if the annual option should be shown on the donation form, and show it if so
*
* @returns {boolean} true if the annual option is enabled
*/
donationForm.initAnnualRecurring = function() {
/*
Before adding a language here, please check that we have annual translations in-place for:
- the button here on donatewiki ([[MediaWiki:Frequency-Annual]])
- the thank you receipt email
- donor relations macros
- the thank you page (optional if it has no recurring-specific messaging)
*/
const annualLanguages = [
'%%isolang%%', '%25%25ISOLANG%25%25', '%25%25isolang%25%25', // for certain issues in email links
'en', 'en-ca', 'en-gb', 'en-us',
'ca', 'cs', 'da', 'de', 'el', 'es-419', 'es', 'fr', 'hu', 'it',
'ja', 'nb', 'nl', 'pl', 'pt-br', 'pt', 'sv',
];
const annualInput = document.getElementById( 'frequency_annual' );
if ( !annualInput ) { // old form without required input
return false;
}
let annualEnabled = annualLanguages.includes( mw.config.get( 'wgPageContentLanguage' ) );
// Allow overriding with URL params
if (
mw.util.getParamValue( 'form-countryspecific' ) === 'Form-countryspecific-annual' // compatibility with old method
|| mw.util.getParamValue( 'annual_enabled' ) === '1'
) {
annualEnabled = true;
}
if ( mw.util.getParamValue( 'annual_enabled' ) === '0' ) {
annualEnabled = false;
}
annualInput.parentNode.style.display = annualEnabled ? 'block' : 'none';
if ( annualEnabled ) {
document.forms.donateForm.classList.add( 'annual-enabled' );
}
return annualEnabled;
};
/**
* Change the amount options on the donation form
* @param {array} newAmounts
*/
donationForm.setAmountOptions = function( newAmounts ) {
for (var j = 0; j < newAmounts.length; j++) {
var $radio = $( `#input_amount_${j}` );
var $label = $( `label[for="input_amount_${j}"]` );
$radio.val( newAmounts[j] );
$label.text( donationForm.formatCurrency( newAmounts[j] ) );
}
};
/**
* Get the current amount options e.g. to store original amounts before changing them
* @returns {array} Array of amounts as numbers
*/
donationForm.getAmountOptions = function() {
let amounts = [];
document.querySelectorAll('input[name="amount"]').forEach( (input) => {
let amount = parseFloat( input.value );
if ( !isNaN( amount ) ) {
amounts.push( amount );
}
} );
return amounts;
};
/*
Based on github:braintree/braintree-web/src/venmo/shared/supports-venmo.js
See also on meta: MediaWiki:FundraisingBanners/VenmoBrowserCheck.js
*/
donationForm.isVenmoSupported = function(options) {
var options = options || {
allowNewBrowserTab: false,
allowWebviews: true,
allowDesktop: true,
allowDesktopWebLogin: true
};
var ua = window.navigator.userAgent;
var merchantAllowsReturningToNewBrowserTab,
merchantAllowsWebviews,
merchantAllowsDesktopBrowsers;
var isMobileDevice = isAndroid() || isIos();
var isAndroidChrome = isAndroid() && isChrome();
var isMobileDeviceThatSupportsReturnToSameTab = isIosSafari() || isAndroidChrome;
var isKnownUnsupportedMobileBrowser = isIosChrome() || isFacebookOwnedBrowserOnAndroid() || isSamsung();
options = options || {};
// NEXT_MAJOR_VERSION allowDesktop will default to true, but can be opted out
merchantAllowsDesktopBrowsers =
(options.allowDesktopWebLogin || options.allowDesktop) === true;
merchantAllowsReturningToNewBrowserTab = options.hasOwnProperty(
"allowNewBrowserTab"
)
? options.allowNewBrowserTab
: true;
// NEXT_MAJOR_VERSION webviews are not supported, except for the case where
// the merchant themselves is presenting venmo in a webview using the deep
// link url to get back to their app. For the next major version, we should
// just not have this option and instead require the merchant to determine
// if the venmo button should be displayed when presenting it in the
// merchant's app via a webview.
merchantAllowsWebviews = options.hasOwnProperty("allowWebviews")
? options.allowWebviews
: true;
if (isKnownUnsupportedMobileBrowser) {
return false;
}
if (
!merchantAllowsWebviews &&
(isAndroidWebview() || isIosWebview())
) {
return false;
}
if (!isMobileDevice) {
return merchantAllowsDesktopBrowsers;
}
if (!merchantAllowsReturningToNewBrowserTab) {
return isMobileDeviceThatSupportsReturnToSameTab;
}
return isMobileDevice;
/* -- functions mostly from github:braintree/browser-detection library -- */
function isAndroid() {
return /Android/i.test(ua);
}
function isIos(checkIpadOS = true) {
const iOsTest = /iPhone|iPod|iPad/i.test(ua);
return checkIpadOS ? iOsTest || isIpadOS() : iOsTest;
}
function isIpadOS() {
// "ontouchend" is used to determine if a browser is on an iPad, otherwise
// user-agents for iPadOS behave/identify as a desktop browser
return /Mac|iPad/i.test(ua) && "ontouchend" in window.document;
}
function isEdge() {
return ua.indexOf("Edge/") !== -1 || ua.indexOf("Edg/") !== -1;
}
function isSamsung() {
return /SamsungBrowser/i.test(ua);
}
function isDuckDuckGo() {
return ua.indexOf("DuckDuckGo/") !== -1;
}
function isOpera() {
return (
ua.indexOf("OPR/") !== -1 ||
ua.indexOf("Opera/") !== -1 ||
ua.indexOf("OPT/") !== -1
);
}
function isSilk() {
return ua.indexOf("Silk/") !== -1;
}
function isChrome() {
return (
(ua.indexOf("Chrome") !== -1 || ua.indexOf("CriOS") !== -1) &&
!isEdge() &&
!isSamsung() &&
!isDuckDuckGo() &&
!isOpera() &&
!isSilk()
);
}
function isIosFirefox() {
return /FxiOS/i.test(ua);
}
function isWebkit() {
const webkitRegexp = /webkit/i;
return webkitRegexp.test(ua);
}
function isIosChrome() {
return ua.indexOf("CriOS") > -1;
}
function isFacebook() {
return ua.indexOf("FBAN") > -1;
}
function isIosSafari() {
return (
isIos() &&
isWebkit() &&
!isIosChrome() &&
!isIosFirefox() &&
!isFacebook()
);
}
function isFacebookOwnedBrowserOnAndroid() {
var e = ua.toLowerCase();
return -1 < e.indexOf("huawei") && -1 < e.indexOf("fban") || isAndroid() && (-1 < e.indexOf("fb_iab") || -1 < e.indexOf("instagram"));
}
function isSamsungBrowser() {
return /SamsungBrowser/i.test(ua);
}
function isAndroidWebview() {
return isAndroid() && -1 < ua.toLowerCase().indexOf("wv");
}
function isGoogleSearchApp() {
return /\bGSA\b/.test(ua);
}
function isIosGoogleSearchApp() {
return isIos() && isGoogleSearchApp();
}
function isIosWebview() {
if (isIos()) {
// The Google Search iOS app is technically a webview and doesn't support popups.
if (isIosGoogleSearchApp()) {
return true;
}
// Historically, a webview could be identified by the presence of AppleWebKit and _no_ presence of Safari after.
return /.+AppleWebKit(?!.*Safari)/i.test(ua);
}
return false;
}
};
/* End form functions */
$(document).ready(function() {
mw.loader.using( ['mediawiki.util'] ).done( function() {
var form = document.forms.donateForm;
// Minimum amount is usually about 1 USD
donationForm.minLocal = donationForm.currencyRates[ donationForm.currency ];
donationForm.minLocal = Math.ceil( donationForm.minLocal * 100 ) / 100; // Round it up
donationForm.maxUSD = 25000;
donationForm.maxLocal = Math.floor( donationForm.currencyRates[ donationForm.currency ] * donationForm.maxUSD );
// Overrides for India
if ( donationForm.currency === 'INR' ) {
donationForm.minLocal = 10;
// Until https://phabricator.wikimedia.org/T370583 fixed?
donationForm.maxUSD = 3000;
donationForm.maxLocal = 250000;
}
// Block typing symbols in Other field
donationForm.otherInputControl( document.getElementById('input_amount_other_box') );
// Clear errors and update fee when selected/entered
$('.amount-options').on( 'input change', function() {
// Ideally we would validate the amount, but this causes issues with focus
$('.amount-options .lp-error').hide();
donationForm.updateFeeDisplay();
});
// Disable submitting form with Enter key
$('form[name="donateForm"]').on('keypress', function(e) {
var code = ( e.keyCode ? e.keyCode : e.which );
if ( code == 13 ) {
e.preventDefault();
}
});
// But allow Enter on buttons
$('.payment-method-button').keyup(function(e) {
if (event.keyCode === 13) {
e.target.click();
}
});
if ( form ) {
donationForm.initAnnualRecurring();
// hide frequency options for some countries
if ( donationForm.noRecurringCountries.includes( donationForm.country ) ) {
$('#frequency_onetime').prop('checked', true);
$('.frequency-options, #cancel-monthly, #donate-recurring-smallprint').hide();
}
if ( donationForm.noRecurringPaypalCountries.includes( donationForm.country ) ) {
$( '.paymentmethod-pp, .paymentmethod-pp-usd' ).addClass( 'not-monthly-capable' );
}
// Format amounts on buttons
$( '.amount-options li' ).each( function( index ) {
let amount = this.querySelector( 'input' ).value;
if ( amount !== 'Other' ) {
this.querySelector( 'label' ).innerText = donationForm.formatCurrency( amount );
}
});
addCardTypesClass( donationForm.country );
// Only show Amazon for links from Ways to give
if (
mw.util.getParamValue( 'wmf_source' ) === 'Waystogive' ||
mw.util.getParamValue( 'wmf_source' ) === 'Ways_to_Give'
) {
$('.paymentmethod-amazon').show();
}
// Only show DAF for certain Major Gifts links
if ( mw.util.getParamValue( 'wmf_campaign' ) === 'MG2WIR25' ) {
$('.paymentmethod-daf').show();
} else {
$('.paymentmethod-daf').hide();
}
// Apple Pay
if ( $('.paymentmethod-applepay').length > 0 ) {
if ( !donationForm.shouldShowApplePay( donationForm.country ) ) {
$('.paymentmethod-applepay').remove();
}
}
// Venmo browser check
if ( $('.paymentmethod-venmo').length > 0 ) {
if ( !donationForm.isVenmoSupported() || donationForm.country !== 'US' ) {
$('.paymentmethod-venmo').remove();
}
}
// Hide Google Pay if people are coming from iOS app https://phabricator.wikimedia.org/T411504
if ( mw.util.getParamValue('wmf_campaign') === 'iOS' ) {
$('.paymentmethod-google').remove();
}
}
// Links open in new tab
$('.links-in-new-tab a').attr('target', '_blank');
// Disable logo link
$('#p-logo a').attr( { href: '#', title: '' } );
// These don't need to be tabbable on the landing page
$('#searchInput, .mw-jump-link').attr('tabindex', '-1');
$('.input_amount_other').click(function() {
$('#input_amount_other_box').focus();
});
// Allow preselecting frequency if possible
if (
!donationForm.noRecurringCountries.includes( donationForm.country )
&& mw.util.getParamValue( 'utm_medium' ) !== 'endowment'
&& mw.util.getParamValue( 'wmf_medium' ) !== 'endowment'
) {
if ( mw.util.getParamValue( 'frequency' ) ) {
donationForm.setFrequency( mw.util.getParamValue( 'frequency' ) );
} else if ( mw.util.getParamValue('monthly') && mw.util.getParamValue('monthly') !== '0' ) {
// old method with "monthly=" parameter
donationForm.setFrequency( 'monthly' );
} else {
donationForm.setFrequency( 'onetime' );
}
}
// If we are emailing them and they have a contact_id, then we can assume they have opted in,
// unless this is a "Remind Me Later" email, or they are in a stricter country
let hasContactId = mw.util.getParamValue( 'contact_id' ) !== null;
let isRML = mw.util.getParamValue( 'wmf_campaign' ) && mw.util.getParamValue( 'wmf_campaign' ).includes( 'RMLEmail' );
let isStrictCountry = [ 'AT', 'IT' ].includes( donationForm.country );
if ( document.getElementById('optin-yes') && hasContactId && !isRML && !isStrictCountry ) {
document.getElementById('optin-yes').checked = true;
document.querySelector('.optin-options').style.display = 'none';
}
donationForm.initOptin();
try {
adjustHPC();
adjustMinAmounts();
// Store original amounts to switch back later if needed
donationForm.originalAmounts = donationForm.getAmountOptions();
preSelect(); // Make sure to do this *after* other fiddling with values
preSelectBox();
donationForm.localizeErrors();
}
finally {
$('.frb-monthly-pitch, .frb-monthly-pitch-thanks, .frb-recurring-pitch').appendTo('.frequency-options');
$('.ptf').appendTo('.amount-options');
$('.optin-options').insertAfter('.amount-options');
$('.consider-amounts').show();
$('#actual-form').show();
$('#actual-form-loading').hide();
}
});
});
e58hfix8wddtb5c9eus12vg1uuf5ggg
42986
42985
2026-08-18T16:54:25Z
Pcoombe
5
42986
javascript
text/javascript
/* jshint strict:false */
/** MediaWiki:DonationForm.js - loaded on all donation forms
* TODO: lots of cleanup
*/
var donationForm = {};
donationForm.loadedTime = Date.now();
donationForm.extraData = {
'vw' : window.innerWidth,
'vh' : window.innerHeight
};
donationForm.country = mw.util.getParamValue('country').toUpperCase();
try {
donationForm.currency = document.forms.donateForm.currency_code.value;
} catch (error) {
donationForm.currency = 'USD';
}
/**
* Make language and country into a standard javascript Intl locale identifier
*
* @param {string} language
* @param {string} country
* @return {string} locale identifier e.g. en-GB
*/
donationForm.getLocale = function( language, country ) {
// Sometimes in email testing links the uselang is a variable contiaining %
// In that case fall back to English so locale code doesn't break form
if ( language.match('%') ) {
language = 'en';
}
// MediaWiki allows some language codes like en-gb, en-ca, pt-br
// We don't want these for a javascript locale, so drop anything after '-'
language = language.split('-')[0];
return language + '-' + country;
};
donationForm.locale = donationForm.getLocale( mw.config.get('wgPageContentLanguage'), donationForm.country );
// Don't offer recurring at all in these countries
donationForm.noRecurringCountries = [ 'AR', 'IN' ];
donationForm.noRecurringPaypalCountries = [ 'CL', 'CO', 'PE', 'UY', 'BR' ];
donationForm.currencyRates = {
// From https://github.com/wikimedia/wikimedia-fundraising-SmashPig/blob/master/PaymentData/ReferenceData/CurrencyRates.php
// Updated 2025-11-03
'ADF' : 5.69,
'ADP' : 144,
'AED' : 3.67,
'AFA' : 66,
'AFN' : 66,
'ALL' : 83,
'AMD' : 374,
'ANG' : 1.79,
'AOA' : 912,
'AON' : 912,
'ARS' : 1457,
'ATS' : 12,
'AUD' : 1.53,
'AWG' : 1.79,
'AZM' : 8500,
'AZN' : 1.7,
'BAM' : 1.7,
'BBD' : 2,
'BDT' : 121,
'BEF' : 35,
'BGL' : 1.7,
'BGN' : 1.7,
'BHD' : 0.37401652162054,
'BIF' : 2923,
'BMD' : 1,
'BND' : 1.3,
'BOB' : 6.76,
'BRL' : 5.37,
'BSD' : 1,
'BTN' : 89,
'BWP' : 13,
'BYR' : 34102,
'BZD' : 1.98,
'CAD' : 1.4,
'CDF' : 2224,
'CHF' : 0.80650783228772,
'CLP' : 940,
'CNY' : 7.12,
'COP' : 3853,
'CRC' : 496,
'CUC' : 1,
'CUP' : 25,
'CVE' : 96,
'CYP' : 0.50784522451156,
'CZK' : 21,
'DEM' : 1.7,
'DJF' : 178,
'DKK' : 6.48,
'DOP' : 64,
'DZD' : 130,
'ECS' : 24094,
'EEK' : 14,
'EGP' : 47,
'ESP' : 144,
'ETB' : 153,
'EUR' : 0.86770508259643,
'FIM' : 5.16,
'FJD' : 2.27,
'FKP' : 0.76116218937783,
'FRF' : 5.69,
'GBP' : 0.76116218937783,
'GEL' : 2.68,
'GHC' : 108957,
'GHS' : 11,
'GIP' : 0.76116218937783,
'GMD' : 71,
'GNF' : 8637,
'GRD' : 296,
'GTQ' : 7.55,
'GYD' : 205,
'HKD' : 7.77,
'HNL' : 26,
'HRK' : 6.54,
'HTG' : 130,
'HUF' : 336,
'IDR' : 16671,
'IEP' : 0.68337328567002,
'ILS' : 3.25,
'INR' : 89,
'IQD' : 1292,
'IRR' : 42020,
'ISK' : 126,
'ITL' : 1680,
'JMD' : 159,
'JOD' : 0.70900000000001,
'JPY' : 154,
'KES' : 128,
'KGS' : 87,
'KHR' : 3971,
'KMF' : 427,
'KPW' : 135,
'KRW' : 1429,
'KWD' : 0.30641816376358,
'KYD' : 0.83333299999999,
'KZT' : 526,
'LAK' : 21568,
'LBP' : 89680,
'LKR' : 303,
'LRD' : 182,
'LSL' : 17,
'LTL' : 3,
'LUF' : 35,
'LVL' : 0.60982660286911,
'LYD' : 5.44,
'MAD' : 9.19,
'MDL' : 17,
'MGA' : 4474,
'MGF' : 9150,
'MKD' : 53,
'MMK' : 2093,
'MNT' : 2620,
'MOP' : 8.01,
'MRO' : 395,
'MTL' : 0.37250579195865,
'MUR' : 45,
'MVR' : 15,
'MWK' : 1730,
'MXN' : 19,
'MYR' : 4.2,
'MZM' : 63200,
'MZN' : 63,
'NAD' : 17,
'NGN' : 1446,
'NIO' : 36,
'NLG' : 1.91,
'NOK' : 10,
'NPR' : 141,
'NZD' : 1.75,
'OMR' : 0.38352905117543,
'PAB' : 1,
'PEN' : 3.35,
'PGK' : 4.17,
'PHP' : 59,
'PKR' : 282,
'PLN' : 3.69,
'PTE' : 174,
'PYG' : 6991,
'QAR' : 3.6,
'ROL' : 44083,
'RON' : 4.41,
'RSD' : 101,
'RUB' : 81,
'RWF' : 1446,
'SAR' : 3.75,
'SBD' : 8.21,
'SCR' : 14,
'SDD' : 59715,
'SDG' : 597,
'SDP' : 2261,
'SEK' : 9.49,
'SGD' : 1.3,
'SHP' : 0.76116218937783,
'SIT' : 208,
'SKK' : 26,
'SLL' : 19750,
'SOS' : 550,
'SRD' : 39,
'SRG' : 38521,
'STD' : 21169,
'SVC' : 8.75,
'SYP' : 513,
'SZL' : 17,
'THB' : 32,
'TJS' : 9.15,
'TMM' : 16757,
'TMT' : 3.35,
'TND' : 2.93,
'TOP' : 2.4,
'TRL' : 42048152,
'TRY' : 42,
'TTD' : 6.69,
'TWD' : 31,
'TZS' : 2442,
'UAH' : 42,
'UGX' : 3463,
'USD' : 1,
'UYU' : 40,
'UZS' : 11982,
'VEB' : 22204414173,
'VEF' : 22204414,
'VND' : 26302,
'VUV' : 112,
'WST' : 2.71,
'XAF' : 569,
'XAG' : 0.020582109674161,
'XAU' : 0.000249595454823,
'XCD' : 2.7,
'XEU' : 0.86770508259643,
'XOF' : 569,
'XPD' : 0.00068810810716198,
'XPF' : 104,
'XPT' : 0.00063604563466001,
'YER' : 238,
'YUN' : 101,
'ZAR' : 17,
'ZMK' : 5176,
'ZWD' : 373
};
/* Amount and currency formatting */
let formatters = {
// Amounts without currency symbol
amountFraction: new Intl.NumberFormat( donationForm.locale,
{ minimumFractionDigits: 2, maximumFractionDigits: 2 }
),
amountWhole: new Intl.NumberFormat( donationForm.locale,
{}
)
};
// currencyDisplay: 'narrowSymbol' fixes some issues like en-CO showing the ISO code
// but browser support is lacking, so wrap in a try/catch
try {
formatters.currencyFraction = new Intl.NumberFormat( donationForm.locale,
{ style: 'currency', currency: donationForm.currency, currencyDisplay: 'narrowSymbol' }
);
formatters.currencyWhole = new Intl.NumberFormat( donationForm.locale,
{ style: 'currency', currency: donationForm.currency, currencyDisplay: 'narrowSymbol', minimumFractionDigits: 0 }
);
} catch(e) {
formatters.currencyFraction = new Intl.NumberFormat( donationForm.locale,
{ style: 'currency', currency: donationForm.currency }
);
formatters.currencyWhole = new Intl.NumberFormat( donationForm.locale,
{ style: 'currency', currency: donationForm.currency, minimumFractionDigits: 0 }
);
}
donationForm.formatCurrency = function( amount ) {
if ( amount % 1 !== 0 ) { // Not a whole number
return formatters.currencyFraction.format( amount );
} else {
return formatters.currencyWhole.format( amount );
}
};
donationForm.formatAmount = function( amount ) {
var formatterOptions, output;
if ( amount % 1 !== 0 ) { // Not a whole number
return formatters.amountFraction.format( amount );
} else {
return formatters.amountWhole.format( amount );
}
};
/* Localize the amount errors. Call when initialising form. */
donationForm.localizeErrors = function() {
var currency = donationForm.currency;
$('.lp-error-smallamount').text( function( index, oldText ) {
return oldText.replace( '$1', donationForm.formatAmount( donationForm.minLocal ) + '\xa0' + currency );
});
if ( currency === 'USD' ) {
// we don't need to include the conversion
$('.lp-error-bigamount').text( function( index, oldText ) {
return oldText.replace( '($1 $2) ', '' )
.replace( '($1 $2) ', '' );
});
}
$('.lp-error-bigamount').text( function( index, oldText ) {
return oldText.replace( '$1', donationForm.formatAmount( donationForm.maxLocal ) )
.replace( '$2', currency )
.replace( '$3', 'benefactors@wikimedia.org' )
.replace( '$4', donationForm.formatAmount( donationForm.maxUSD ) );
});
};
function adjustMinAmounts() {
// Amounts spreadsheet https://docs.google.com/spreadsheets/d/1oJGy5ZxBL0HYl5pwbEORkl_VXy3SEjmT7ZOVYQdBsXQ/edit?gid=1360915542#gid=1360915542
// Defining lookup table here. Using mw.loader.getScript was visibly too slow for the user (amounts flashing)
const minPlusLookup = {
// US - Canada - UK - EUR - Australia - New Zealand
// https://docs.google.com/spreadsheets/d/1oJGy5ZxBL0HYl5pwbEORkl_VXy3SEjmT7ZOVYQdBsXQ/edit?gid=1360915542#gid=1360915542
USD: {
amount1: { from: 2.75, to: 4.50 },
amount2: { from: 5, to: 7 },
},
GBP: {
amount1: { from: 2, to: 4 },
amount2: { from: 5, to: 7 },
},
EUR: {
amount1: { from: 2.50, to: 4.50 },
amount2: { from: 5, to: 7 },
},
// English Bundle
// https://docs.google.com/spreadsheets/d/1oJGy5ZxBL0HYl5pwbEORkl_VXy3SEjmT7ZOVYQdBsXQ/edit?gid=891721479#gid=891721479
HUF: {
amount1: { from: 500, to: 750 },
},
MYR: {
amount1: { from: 10, to: 20 },
amount2: { from: 30, to: 40 },
},
RON: {
amount1: { from: 10, to: 30 },
},
// Other
// https://docs.google.com/spreadsheets/d/1oJGy5ZxBL0HYl5pwbEORkl_VXy3SEjmT7ZOVYQdBsXQ/edit?gid=1865233115#gid=1865233115
CZK: {
amount1: { from: 50, to: 100 },
amount2: { from: 100, to: 150 },
},
DKK: {
amount1: { from: 20, to: 40 },
amount2: { from: 75, to: 80 },
},
JPY: {
amount1: { from: 500, to: 1000 },
amount2: { from: 1000, to: 2000 },
amount3: { from: 2000, to: 3000 },
amount4: { from: 2500, to: 4000 },
amount5: { from: 4000, to: 5000 },
amount6: { from: 5000, to: 10000 },
amount7: { from: 10000, to: 15000 },
},
ZAR: {
amount1: { from: 30, to: 50 },
amount2: { from: 50, to: 75 },
},
NOK: {
amount1: { from: 30, to: 50 },
},
SEK: {
amount1: { from: 30, to: 50 },
amount2: { from: 50, to: 70 },
},
ILS: {
amount1: { from: 10, to: 20 },
},
PLN: {
amount1: { from: 10, to: 20 },
amount2: { from: 20, to: 30 },
},
CHF: {
amount1: { from: 20, to: 30 },
},
THB: {
amount1: { from: 100, to: 150 },
amount2: { from: 200, to: 250 },
},
};
// CAD, AUD, NZD = USD amounts
minPlusLookup.CAD = minPlusLookup.USD;
minPlusLookup.AUD = minPlusLookup.USD;
minPlusLookup.NZD = minPlusLookup.USD;
if ( mw.util.getParamValue( 'minPlus' ) === '1' || mw.util.getParamValue( 'minPlus' ) === 'true' ) {
const currencyEntry = minPlusLookup[ donationForm.currency ];
// Currency not in lookup table. No swapping.
if ( !currencyEntry ) return null;
const amountKeys = Object.keys( currencyEntry ); // ["amount1", "amount2"] or however many keys in lookup
amountKeys.forEach( (amount, index) => {
const $radio = $( `#input_amount_${index}` );
const $label = $( `label[for='input_amount_${index}` );
// If the button's amount is equal to "from" in the lookup, perform the swap.
// Guards from hpc adjusted amounts as those values won't be present in the lookup.
if ( currencyEntry[amount].from === parseFloat( $radio.val() ) ) {
$radio.val( currencyEntry[amount].to );
$label.text( donationForm.formatCurrency( currencyEntry[amount].to ) );
}
});
}
}
function adjustHPC() {
/* Adjust amounts based on highest previous contribution (hpc)
or most recent contribution (mrc) parameter. Used for emails.
TODO: split data out? */
var hpcSet = mw.util.getParamValue('hpcSet');
// Look for 'hpc' parameter, then 'mrc'
var hpc = parseFloat( mw.util.getParamValue('hpc') );
if( isNaN(hpc) ) {
hpc = parseFloat( mw.util.getParamValue('mrc') );
if( isNaN(hpc) ) {
if ( hpcSet ) {
// Allow using hpcSet even without hpc, for MG appeals
hpc = 0;
} else {
return;
}
}
}
var currency = donationForm.currency;
// https://phabricator.wikimedia.org/T381437
var hpcCurrency = mw.util.getParamValue('hpcCurrency');
if ( hpcCurrency && hpcCurrency !== currency ) {
console.log('Highest previous contribution currency does not match form currency, using default amounts');
return;
}
// Consult this sheet for amounts: https://docs.google.com/spreadsheets/d/1oJGy5ZxBL0HYl5pwbEORkl_VXy3SEjmT7ZOVYQdBsXQ/edit?gid=1360915542#gid=1360915542
var radioAmountsData = {
"USD" : { // also used for CAD, AUD, NZD
"default" : [
[ 0, [ 2.75, 5, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_Annual" : [
[ 0, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 5, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 10, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus" : [
[ 0, [ 4.50, 7, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus5-50" : [
[ 0, [ 5.50, 7, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus6" : [
[ 0, [ 6, 10, 15, 20, 25, 35, 50 ] ],
[ 5, [ 8, 12, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_AvgGiftPlus" : [
[ 0, [ 2.75, 5, 10, 15, 20, 35, 50 ] ],
[ 5, [ 5, 10, 20, 25, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 35, 40, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 40, 50, 100, 150 ] ],
[ 25, [ 25, 35, 50, 60, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
// Direct Mail - fixed amounts
"directmail" : [
[ 0, [ 25, 35, 50, 100, 150, 250, 300 ] ]
],
"directmail250" : [
[ 0, [ 250, 300, 500, 750, 1000, 2500, 5000 ] ]
]
},
"EUR" : {
"default" : [
[ 0, [ 2.50, 5, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_Annual" : [
[ 0, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 5, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 10, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus" : [
[ 0, [ 4.50, 7, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus5-50" : [
[ 0, [ 5.50, 7, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus6" : [
[ 0, [ 6, 10, 15, 20, 25, 35, 50 ] ],
[ 5, [ 8, 12, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_AvgGiftPlus" : [
[ 0, [ 2.50, 5, 10, 15, 20, 35, 50 ] ],
[ 5, [ 5, 10, 20, 25, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 35, 40, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 40, 50, 100, 150 ] ],
[ 25, [ 25, 35, 50, 60, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
},
"GBP" : {
"default" : [
[ 0, [ 2, 5, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_Annual" : [
[ 0, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 5, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 10, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus" : [
[ 0, [ 4, 7, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus5-50" : [
[ 0, [ 5, 7, 10, 20, 25, 35, 50 ] ],
[ 5, [ 5, 10, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_MinPlus6" : [
[ 0, [ 6, 10, 15, 20, 25, 35, 50 ] ],
[ 5, [ 8, 12, 15, 20, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 25, 35, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 25, 30, 40, 50, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
"FY2526_AvgGiftPlus" : [
[ 0, [ 2, 5, 10, 15, 20, 35, 50 ] ],
[ 5, [ 5, 10, 20, 25, 35, 50, 100 ] ],
[ 10, [ 10, 15, 20, 25, 35, 50, 100 ] ],
[ 15, [ 15, 20, 35, 40, 50, 75, 100 ] ],
[ 20, [ 20, 25, 35, 40, 50, 100, 150 ] ],
[ 25, [ 25, 35, 50, 60, 75, 100, 150 ] ],
[ 35, [ 35, 50, 75, 100, 125, 150, 250 ] ],
[ 50, [ 50, 75, 85, 100, 125, 150, 250 ] ],
[ 75, [ 75, 100, 115, 125, 150, 200, 250 ] ],
[ 100, [ 100, 125, 150, 175, 200, 250, 500 ] ],
[ 125, [ 125, 150, 175, 200, 250, 300, 500 ] ],
[ 150, [ 150, 175, 200, 225, 275, 500, 750 ] ],
[ 175, [ 175, 200, 225, 250, 350, 500, 750 ] ],
[ 200, [ 200, 225, 250, 275, 350, 500, 750 ] ],
[ 225, [ 225, 250, 275, 300, 400, 500, 750 ] ],
[ 250, [ 200, 300, 500, 750, 1000, 2500, 5000 ] ],
[ 500, [ 500, 750, 1000, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ],
[ 3000, [ 3000, 4000, 5000, 6000, 7500, 10000, 12000 ] ]
],
},
"JPY" : [
[ 0, [ 500, 1000, 2000, 2500, 4000, 5000, 10000 ] ],
[ 1000, [ 1000, 1500, 2500, 4000, 5000, 10000, 15000 ] ],
[ 1500, [ 1500, 2000, 3000, 4000, 5000, 10000, 15000 ] ],
[ 2000, [ 2000, 2500, 3500, 5000, 7500, 10000, 25000 ] ],
[ 2500, [ 2500, 3500, 5000, 7500, 10000, 15000, 25000 ] ],
[ 3000, [ 3000, 4000, 5000, 7500, 10000, 15000, 25000 ] ],
[ 5000, [ 5000, 10000, 15000, 20000, 35000, 50000, 100000 ] ],
[ 10000, [ 10000, 25000, 50000, 75000, 100000, 150000, 200000 ] ]
],
"SEK" : [
[ 0, [ 30, 50, 100, 150, 200, 300, 500 ] ],
[ 50, [ 50, 100, 150, 200, 300, 500, 750 ] ],
[ 200, [ 200, 300, 500, 750, 1000, 1500, 2000 ] ]
]
};
radioAmountsData.AUD = radioAmountsData.USD;
radioAmountsData.CAD = radioAmountsData.USD;
radioAmountsData.NZD = radioAmountsData.USD;
// Major gifts appeals, hacky but this is easier than adding a load of new forms to maintain
var currencyList = [ 'USD', 'CAD', 'AUD', 'NZD', 'GBP', 'EUR' ]; // close enough
for ( let i = 0; i < currencyList.length; i++ ) {
// FY2425 hpcSets
// Major Gifts hpcSets
radioAmountsData[ currencyList[i] ].MG_2024_500 = [ [ 0, [ 500, 750, 1000, 1250, 1500, 1750, 2000 ] ] ];
radioAmountsData[ currencyList[i] ].MG_2024_650 = [ [ 0, [ 650, 750, 1000, 1250, 1500, 1750, 2000 ] ] ];
// FY2526 hpcSets
// Direct Mail hpcSets
radioAmountsData[ currencyList[i] ].DM_2526_15 = [ [ 0, [ 15, 25, 35, 50, 100, 200, 250 ] ] ];
radioAmountsData[ currencyList[i] ].DM_2526_250 = [ [ 0, [ 250, 300, 500, 750, 1000, 2500, 5000 ] ] ];
radioAmountsData[ currencyList[i] ].DM_2526_5000 = [ [ 0, [ 5000, 7500, 10000, 12500, 15000, 17500, 20000 ] ] ];
// Major Gifts hpcSets
radioAmountsData[ currencyList[i] ].MG_2526_500_9999 = [
[ 0, [ 750, 850, 1000, 1250, 1500, 1750, 2000 ] ],
[ 1000, [ 1500, 2000, 2500, 3000, 3750, 4500, 5000 ] ],
[ 3000, [ 4000, 5000, 6000, 7000, 8000, 9000, 10000 ] ]
];
radioAmountsData[ currencyList[i] ].MG_2526_10K = [ [ 0, [ 5000, 7500, 10000, 12500, 15000, 17500, 20000 ] ] ];
radioAmountsData[ currencyList[i] ].MG_2526_250_399 = [ [ 0, [ 500, 750, 1000, 1250, 1500, 1750, 2000 ] ] ];
radioAmountsData[ currencyList[i] ].MG_2526_400_499 = [ [ 0, [ 650, 750, 1000, 1250, 1500, 1750, 2000 ] ] ];
radioAmountsData[ currencyList[i] ].MG_2526_HNWI_250 = [ [ 0, [ 250, 300, 500, 750, 1000, 2500, 5000 ] ] ];
radioAmountsData[ currencyList[i] ].MG_2526_HNWI_350 = [ [ 0, [ 350, 400, 500, 750, 1000, 2500, 5000 ] ] ];
radioAmountsData[ currencyList[i] ].MG_2526_2500 = [ [ 0, [ 2500, 3000, 5000, 7500, 10000, 15000, 25000 ] ] ];
}
var appealAmountsData = {
"USD" : [ // also used for CAD, AUD, NZD, GBP, EUR
[ 0, [ 5, 10, 20 ] ],
[ 10, [ 10, 20, 50 ] ],
[ 20, [ 20, 30, 50 ] ],
[ 35, [ 20, 30, 50 ] ],
[ 50, [ 20, 50, 100 ] ],
[ 75, [ 50, 75, 100 ] ],
[ 100, [ 75, 100, 150 ] ],
[ 150, [ 75, 100, 200 ] ],
[ 200, [ 100, 200, 300 ] ]
],
"JPY" : [
[ 0, [ 300, 500, 1000 ] ],
[ 3, [ 500, 1000, 1500 ] ],
[ 5, [ 1000, 1500, 2000 ] ],
[ 10, [ 1500, 2000, 5000 ] ],
[ 20, [ 2000, 3000, 5000 ] ],
[ 50, [ 2000, 5000, 10000 ] ],
[ 100, [ 5000, 10000, 15000 ] ]
],
"SEK" : [
[ 0, [ 20, 50, 100 ] ],
[ 3, [ 30, 50, 100 ] ],
[ 5, [ 50, 100, 150 ] ],
[ 15, [ 100, 150, 200 ] ],
[ 23, [ 100, 200, 300 ] ],
[ 38, [ 100, 200, 500 ] ],
[ 75, [ 100, 500, 750 ] ],
[ 112, [ 100, 500, 1000 ] ]
]
};
appealAmountsData.AUD = appealAmountsData.USD;
appealAmountsData.CAD = appealAmountsData.USD;
appealAmountsData.GBP = appealAmountsData.USD;
appealAmountsData.NZD = appealAmountsData.USD;
appealAmountsData.EUR = appealAmountsData.USD;
// Radio button amounts
var radioAmounts = pickAmountArray( radioAmountsData, currency, hpc, hpcSet );
if ( radioAmounts.length ) {
donationForm.setAmountOptions( radioAmounts );
}
// Appeal amounts
var appealAmounts = pickAmountArray( appealAmountsData, currency, hpc, hpcSet );
if ( appealAmounts.length ) {
var appealAmountString = appealAmounts.map( donationForm.formatCurrency ).join( ', ');
$('.consider-amounts').html(appealAmountString);
}
}
function pickAmountArray( data, currency, hpc, hpcSet ) {
/**
* Choose the amounts for radio buttons / appeal based on hpc
* @param {Object} data
* @param {String} currency
* @param {Number} hpc
* @param {String} hpcSet
* @return {Array} Array of amounts (as numbers)
*/
var set, amounts;
if ( !(currency in data) ) {
return [];
}
if ( $.isArray(data[currency]) ) {
// No variant sets
set = data[currency];
} else {
// We need to go deeper. Check the variants.
if ( hpcSet in data[currency] ) {
set = data[currency][hpcSet];
} else {
set = data[currency]['default'];
}
}
// Find correct amount array for this hpc
for (var i = 0; i < set.length; i++) {
if ( set[i][0] > hpc ) {
break;
}
amounts = set[i][1];
}
return amounts;
}
function preSelect() {
/* Check for a 'preSelect' url parameter, and select that option.
If there isn't an option, add it to the "Other" box and select that */
var preSelectAmount = parseFloat( mw.util.getParamValue('preSelect') || mw.util.getParamValue('preselect') );
if ( preSelectAmount > 0 ) {
let hpcCurrency = mw.util.getParamValue('hpcCurrency');
if ( hpcCurrency && hpcCurrency !== donationForm.currency ) {
console.log('Highest previous contribution currency does not match form currency, not doing preselection');
return;
}
var $preSelectOption = $('input[name="amount"][value="' + preSelectAmount + '"]');
if ( $preSelectOption.length ) {
// Select existing input
$preSelectOption.prop('checked', true);
} else {
$('#input_amount_other_box').val( preSelectAmount );
$('#input_amount_other').prop('checked', true);
}
donationForm.updateFeeDisplay();
}
}
function preSelectBox() {
/* Check for a 'preSelectBox' url parameter, and select that numbered option.
If the value provided is invalid or doesn't exist, exit. Valid choices are 1 to 7 (8 is "Other").
If 'preSelect' exists, ignore this function. */
if(!mw.util.getParamValue('preSelect')){
// Check hpcCurrency first before running preselection.
let hpcCurrency = mw.util.getParamValue('hpcCurrency');
if ( hpcCurrency && hpcCurrency !== donationForm.currency ) {
console.log('Highest previous contribution currency does not match form currency, not preselecting box.');
return;
}
// If hpc & hpcCurrency provided are okay OR hpc wasn't provided then continue.
var preSelectBoxNumber = parseInt( mw.util.getParamValue('preSelectBox') );
if (preSelectBoxNumber >= 1 && preSelectBoxNumber <= 7) {
var $preSelectOption = $('input[id="input_amount_' + (preSelectBoxNumber - 1) + '"]');
if ( $preSelectOption.length ) {
$preSelectOption.prop('checked', true);
donationForm.updateFeeDisplay();
}
}
}
}
function addCardTypesClass(country) {
/**
* Add card types class to credit card button, so we can show correct logos
* Banner equivalent: https://meta.wikimedia.org/wiki/MediaWiki:FundraisingBanners/LocalizeJS-2017.js
* @param {String} country ISO code
*/
var cardTypes = {
// Big 6
'US' : 'vmad',
'CA' : 'vma',
'GB' : 'vmaj',
'IE' : 'vmaj',
'AU' : 'vmaj',
'NZ' : 'vma',
// Euro countries
'AT' : 'vmaj',
'BE' : 'vmaj',
'ES' : 'vmaj',
'FR' : 'vma',
'IT' : 'vmaj',
'LU' : 'vmaj',
'LV' : 'vma',
'NL' : 'vmaj',
'PT' : 'vmaj',
'SK' : 'vmaj',
'GR' : 'vma',
// Others
'CZ' : 'vmad',
'DK' : 'vma',
'HU' : 'vma',
'IL' : 'vmad',
// 'JP' : 'vmaj', - use text only as there were complaints about Diners Club not being included
'MY' : 'vmaj',
'NO' : 'vma',
'PL' : 'vma',
'RO' : 'vma',
'SE' : 'vma',
'UA' : 'vma',
'ZA' : 'vm',
'ZZ' : 'vmad' // For testing
};
if ( cardTypes[country] ) {
$('.paymentmethod-cc').addClass('cctypes-' + cardTypes[country] );
$('.cc-text-label').addClass('sr-only');
}
}
/* Form functions */
function clearOther(box) {
document.getElementById('input_amount_other').checked = true;
box.value = "";
}
function selectOther() {
document.getElementById('input_amount_other').checked = true;
}
function selectAmount() {
$('#input_amount_other_box').val('');
}
/* -- Moved from Template:2012FR/Form-section/Processing/Default -- */
/**
* Validate form, and prep most of the parameters
*
* @param {string} paymentMethod - method e.g. 'cc', 'paypal'
* @param {string} paymentSubMethod - submethod e.g. 'rtbt_ideal' (a submethod of 'rtbt')
* @param {string} skipAmountValidation - skip validating amount for PayPal forced to USD
*/
donationForm.redirectPayment = function( paymentMethod, paymentSubMethod, skipAmountValidation ) {
if ( donationForm.validate( skipAmountValidation ) ) {
var params = {};
params.currency = donationForm.currency;
params.country = donationForm.country;
// Overrides for specific gateways
if ( paymentMethod === 'cc-adyen' ) {
params.payment_method = 'cc';
params.gateway = 'adyen';
} else if ( paymentMethod === 'cc-dlocal' ) {
params.payment_method = 'cc';
params.gateway = 'dlocal';
} else if ( paymentMethod === 'trustly' ) {
params.payment_method = 'dd';
params.payment_submethod = 'ach';
params.gateway = 'gravy';
} else if ( paymentSubMethod === 'sepadirectdebit' ) {
params.payment_method = 'rtbt';
params.payment_submethod = 'sepadirectdebit';
params.gateway = 'gravy';
} else if ( paymentMethod === 'bt' && params.country === 'CZ' ) {
params.payment_method = 'bt';
params.gateway = 'gravy';
} else if ( paymentSubMethod === 'vipps' ) {
params.payment_method = 'ew';
params.payment_submethod = 'vipps';
params.gateway = 'gravy';
} else {
params.payment_method = paymentMethod;
}
// dlocal
let dlocalCountries = [ 'AR', 'BR', 'CL', 'CO', 'MX', 'PE', 'UY', 'ZA' ],
dlocalMethods = [ 'cc', 'bt', 'cash', 'cash_boleto', 'pix' ];
if ( dlocalCountries.includes( params.country ) && dlocalMethods.includes( params.payment_method ) ) {
params.gateway = 'gravy';
}
if ( params.payment_method === 'cc' && params.gateway === undefined ) {
params.gateway = 'gravy';
}
if ( params.payment_method === 'paypal' ) {
params.gateway = 'gravy';
}
if ( params.payment_method === 'rtbt' && paymentSubMethod === 'rtbt_ideal' ) {
params.gateway = 'gravy';
}
if ( params.payment_method === 'apple' || params.payment_method === 'google' ) {
params.gateway = 'gravy';
}
if ( paymentSubMethod ) {
params.payment_submethod = paymentSubMethod;
}
let frequency = donationForm.getFrequency();
if ( frequency === 'monthly' ) {
params.recurring = '1';
params.frequency_unit = 'month';
} else if ( frequency === 'annual' ) {
params.recurring = '1';
params.frequency_unit = 'year';
}
params.uselang = mw.config.get('wgPageContentLanguage'); // see T281285 for why not wgUserLanguage
if ( params.uselang === 'pt' && params.country === 'BR' ) {
params.uselang = 'pt-br';
}
if ( params.uselang === 'es' &&
( params.country === 'AR' || params.country === 'CL' ||
params.country === 'CO' || params.country === 'MX' ||
params.country === 'PE' || params.country === 'UY' ||
params.country === 'US' )
) {
params.uselang = 'es-419';
}
var amount = donationForm.getAmount();
if ( $('#ptf-checkbox').prop('checked') ) {
amount = amount + donationForm.calculateFee( amount );
donationForm.extraData.ptf = 1;
}
params.amount = amount;
// Email optin
if ( $('input[name="opt_in"]').length > 0 ) {
var opt_inValue = $('input[name="opt_in"]:checked').val();
params.opt_in = opt_inValue; // donationForm.validate() already checked it's 1 or 0
}
if ( mw.util.getParamValue( 'pym_variant' ) ) {
params.variant = mw.util.getParamValue( 'pym_variant' );
}
if ( params.recurring && params.variant && params.variant.match( /monthlyConvert/ ) ) {
// Post-payments monthly convert makes no sense if it's already recurring
// Avoid things like T312905
delete params.variant;
}
if ( mw.util.getParamValue( 'pym_appeal' ) ) {
params.appeal = mw.util.getParamValue( 'pym_appeal' );
}
// Pass through specified parameters to payments unchanged
const passThroughParams = [
'contact_id', 'contact_hash', // https://phabricator.wikimedia.org/T381405
'checksum', 'contribution_recur_id', // https://phabricator.wikimedia.org/T396271
'recipient_id', // SMS
'app_install_id' // https://phabricator.wikimedia.org/T411535
];
passThroughParams.forEach( ( param ) => {
const value = mw.util.getParamValue( param );
if ( value ) {
params[ param ] = value;
}
} );
// Monthly convert
if ( mc ) { // check just in-case this wasn't loaded for some reason
mc.main( params, donationForm.finalStep );
} else {
donationForm.finalStep( params );
}
} else {
donationForm.extraData.validateError = 1; // Flag they had an error, even if fixed later
}
return false; // don't submit if called by a button
};
/**
* Build final tracking parameters, and submit to payments
* @param {Object} params
*/
donationForm.finalStep = function( params ) {
var url = new URL('https://payments.wikimedia.org/index.php/Special:GatewayChooser');
// Skip form chooser for Venmo
if ( params.payment_method === 'venmo' ) {
url = new URL('https://payments.wikimedia.org/index.php/Special:GravyGateway');
}
// Skip form chooser for Pix
if ( params.payment_method === 'cash' && params.payment_submethod === 'pix' ) {
url = new URL('https://payments.wikimedia.org/index.php/Special:GravyGateway');
}
// And Yape
if ( params.payment_method === 'ew' && params.payment_submethod === 'yape' ) {
url = new URL('https://payments.wikimedia.org/index.php/Special:GravyGateway');
}
donationForm.extraData.time = Math.round( (Date.now() - donationForm.loadedTime)/1000 );
// Tracking data
params.wmf_medium = mw.util.getParamValue( 'wmf_medium' ) || mw.util.getParamValue( 'utm_medium' );
params.wmf_campaign = mw.util.getParamValue( 'wmf_campaign' ) || mw.util.getParamValue( 'utm_campaign' );
params.wmf_source = donationForm.buildTrackingSource( params );
params.wmf_key = donationForm.buildTrackingKey( donationForm.extraData );
if ( document.referrer ) { // TODO: do we need this?
// Strip protocol to stop firewall complaining
params.referrer = document.referrer.replace(/https?:\/\//i, '');
}
for ( var key of Object.keys( params ) ) {
url.searchParams.set( key, params[key] );
}
if ( window.top !== window.self ) {
// In a frame, open payments in a new tab
window.open( url.toString() );
} else {
window.location.href = url.toString();
}
};
/**
* Build a wmf_source value, including the landing page info.
*
* Own function so it can be overriden for weird tests
*
* @param {Object} params
* @return {string} wmf_source
*/
donationForm.buildTrackingSource = function( params ) {
var wmf_source = mw.util.getParamValue( 'wmf_source' ) || mw.util.getParamValue( 'utm_source' );
wmf_source += '.';
var fullDottedPaymentMethod = params.payment_method;
if ( params.recurring ) {
fullDottedPaymentMethod = 'r' + fullDottedPaymentMethod;
}
if ( params.payment_submethod ) {
fullDottedPaymentMethod = fullDottedPaymentMethod + '.' + params.payment_submethod;
}
/* Get URL parameter, but remove parts using old format. Allow fallback to a default value */
var getParam = function( param, removeText, dflt ) {
if ( mw.util.getParamValue( param ) ) {
return mw.util.getParamValue( param ).replace( removeText, '' );
} else {
return dflt;
}
};
/* The landing page info, separated by ~. This mostly exists for legacy reasons */
wmf_source += getParam( 'template' , 'Lp-layout' , 'default' ) + '~';
wmf_source += getParam( 'appeal-template' , 'Appeal-template-' , 'default' ) + '~';
wmf_source += getParam( 'appeal' , 'Appeal-' , 'default' ) + '~';
wmf_source += getParam( 'form-template' , 'Form-template-' , 'default' ) + '~';
wmf_source += getParam( 'form-countryspecific', 'Form-countryspecific-', 'control' );
wmf_source += '.' + fullDottedPaymentMethod;
return wmf_source;
};
/**
* Build a string for wmf_key from extra tracking data
*
* @param {Object} data
* @return {string} wmf_key
*/
donationForm.buildTrackingKey = function(data) {
var existingKey = mw.util.getParamValue( 'wmf_key' ) || mw.util.getParamValue( 'utm_key' ),
dataArray = [];
if ( existingKey ) {
dataArray.push( existingKey );
}
for (var key in data) {
if (data.hasOwnProperty(key)) {
dataArray.push( key + '_' + data[key] );
}
}
return dataArray.join('~');
};
/* Return amount selected or input */
donationForm.getAmount = function() {
var form = document.forms.donateForm,
amount = null;
donationForm.extraData.otherAmt = 0;
// 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 = parseFloat( form.amount[i].value );
}
}
}
// Check the "other" amount box
if ( document.getElementById('input_amount_other').checked ) {
amount = donationForm.parseOtherAmount( form.input_amount_other_box.value );
donationForm.extraData.otherAmt = 1;
}
return amount;
};
/**
* Parse Other field value into amount
*
* Does some awful regex stuff to rm symbols and turn the string into a number
* Remember some locales flip . & , for decimal point/thousands separator
*
* @param {string} value Value of "Other" field
* @return {float} Float with amount, or 0 if NaN
*/
donationForm.parseOtherAmount = function( value ) {
var amount;
value = value.replace(/[,.](\d)$/, '\:$10');
value = value.replace(/[,.](\d)(\d)$/, '\:$1$2');
value = value.replace(/[\$£€¥,.]/g, '');
value = value.replace(/:/, '.');
amount = parseFloat( value );
if ( isNaN( amount ) ) {
return 0;
} else {
return amount;
}
};
/**
* Validate the form.
*/
donationForm.validate = function( skipAmountValidation ) {
var error = false;
var form = document.forms.donateForm;
// Reset all errors
$('.lp-haserror').removeClass('lp-haserror');
$('.lp-error').hide();
if ( !skipAmountValidation && !donationForm.validateAmount() ) {
error = true;
}
if ( form.opt_in ) {
if ( $('input[name="opt_in"]:checked').val() === undefined ) {
$('#error-optin').show().focus();
error = true;
} else {
$('#error-optin').hide();
}
}
return !error;
};
/**
* Check if selected amount is valid i.e. a positive number, between minimum and maximum.
* If not, show an error and return false.
*/
donationForm.validateAmount = function() {
var amount = donationForm.getAmount();
if ( amount === null || isNaN(amount) || amount <= 0 || amount < donationForm.minLocal ) {
$('.amount-options').addClass('lp-haserror');
$('.lp-error-bigamount').hide();
$('.lp-error-smallamount').show().focus();
return false;
} else if ( amount > donationForm.maxLocal ) {
$('.amount-options').addClass('lp-haserror');
$('.lp-error-bigamount').show().focus();
return false;
} else {
$('.amount-options').removeClass('lp-haserror');
$('.lp-error-smallamount, .lp-error-bigamount').hide();
return true;
}
};
donationForm.getFrequency = function() {
return document.forms.donateForm.dataset.frequency || 'onetime';
};
donationForm.setFrequency = function( frequency ) {
// TODO: add some validation to reject invalid frequency values
let form = document.forms.donateForm;
form.frequency.value = frequency; // change input
form.dataset.frequency = frequency;
};
/* Wrapper for compatibility with old forms */
donationForm.toggleMonthly = function( monthly ) {
if ( monthly ) {
donationForm.setFrequency( 'monthly' );
} else {
donationForm.setFrequency( 'onetime' );
}
};
donationForm.updateFeeDisplay = function() {
var selectedAmount = donationForm.getAmount(),
feeAmount = donationForm.calculateFee( selectedAmount ),
feeText;
feeText = donationForm.formatCurrency( feeAmount );
$('.ptf label span').text( feeText );
if ( selectedAmount + feeAmount <= donationForm.maxLocal ) {
$('.ptf').slideDown();
}
};
/**
* Calculate approximate transaction fee on given amount
* @param {number} amount
* @return {number} Rounded to 2 decimal places
*/
donationForm.calculateFee = function( amount ) {
// Minimum fee/PTF amounts. Default is 0.35.
// Updated 2019-05-21 to approx 0.35 USD equivalent
var feeMinimums = {
'DKK' : 2,
'HUF' : 100,
'ILS' : 1.2,
'INR' : 4,
'JPY' : 35,
'KHR' : 1000,
'MYR' : 1,
'NOK' : 3,
'PLN' : 1.35,
'CZK' : 7.5,
'RON' : 1.5,
'SEK' : 3,
'UAH' : 10,
'ZAR' : 5,
// Latin America // Updated 2025-06-10 to approx 0.35 USD equivalent
'BRL' : 2,
'ARS' : 415,
'CLP' : 325,
'COP' : 1450,
'MXN' : 6.75,
'PEN' : 1.28,
'UYU' : 14.5
};
var feeMultiplier = 0.04,
feeMinimum = feeMinimums[ donationForm.currency ] || 0.35,
feeAmount = amount * feeMultiplier;
if ( feeAmount < feeMinimum ) {
feeAmount = feeMinimum;
}
return parseFloat( feeAmount.toFixed(2) );
};
donationForm.initOptin = function() {
$('.optin-options').on('change', function(e) {
$('#error-optin').hide();
// Only do all this if we have translated prompts
if ( $('.optin-no-prompt').data('is-translated') === 'yes' ) {
if ( e.target.id === 'optin-no' ) {
$('.optin-no-prompt').removeClass('is-positive');
if ( !$('.optin-no-prompt').is(':visible') ) {
$('.optin-no-prompt').slideDown();
}
} else {
$('.optin-no-prompt').addClass('is-positive');
}
}
});
};
/**
* Block typing letters and symbols in given input. Used for Other amount inputs
*
* If we don't do this, Safari allows typing them and then chokes on submit
* https://phabricator.wikimedia.org/T118741, https://phabricator.wikimedia.org/T173431
*
* @param {Element} inputElement The element to block typing on
*/
donationForm.otherInputControl = function( inputElement ) {
if ( inputElement ) {
inputElement.onkeypress = function(e) {
// Allow special keys in Firefox
if ((e.code == 'ArrowLeft') || (e.code == 'ArrowRight') ||
(e.code == 'ArrowUp') || (e.code == 'ArrowDown') ||
(e.code == 'Delete') || (e.code == 'Backspace')) {
return;
}
var chr = String.fromCharCode(e.which);
if ( !'0123456789., '.includes(chr) ) {
return false;
}
};
}
};
/**
* Should we show Apple Pay?
*
* Note there is a ~500ms delay in Safari when checking, so only call this if needed
*
* @param {string} country
* @return {boolean}
*/
donationForm.shouldShowApplePay = function ( country ) {
if ( location.search.match('forceApplePay') ) {
return true;
}
if ( window.screen.width >= 640 && country !== 'JP' ) { // T397002
// On a desktop browser, people can scan with their iphone
return true;
} else if ( window.ApplePaySession ) {
// On mobile, check if Apple Pay is available natively
if ( ApplePaySession.canMakePayments() ) {
return true;
}
}
return false;
};
/**
* Determine if the annual option should be shown on the donation form, and show it if so
*
* @returns {boolean} true if the annual option is enabled
*/
donationForm.initAnnualRecurring = function() {
/*
Before adding a language here, please check that we have annual translations in-place for:
- the button here on donatewiki ([[MediaWiki:Frequency-Annual]])
- the thank you receipt email
- donor relations macros
- the thank you page (optional if it has no recurring-specific messaging)
*/
const annualLanguages = [
'%%isolang%%', '%25%25ISOLANG%25%25', '%25%25isolang%25%25', // for certain issues in email links
'en', 'en-ca', 'en-gb', 'en-us',
'ca', 'cs', 'da', 'de', 'el', 'es-419', 'es', 'fr', 'hu', 'it',
'ja', 'nb', 'nl', 'pl', 'pt-br', 'pt', 'sv',
];
const annualInput = document.getElementById( 'frequency_annual' );
if ( !annualInput ) { // old form without required input
return false;
}
let annualEnabled = annualLanguages.includes( mw.config.get( 'wgPageContentLanguage' ) );
// Allow overriding with URL params
if (
mw.util.getParamValue( 'form-countryspecific' ) === 'Form-countryspecific-annual' // compatibility with old method
|| mw.util.getParamValue( 'annual_enabled' ) === '1'
) {
annualEnabled = true;
}
if ( mw.util.getParamValue( 'annual_enabled' ) === '0' ) {
annualEnabled = false;
}
annualInput.parentNode.style.display = annualEnabled ? 'block' : 'none';
if ( annualEnabled ) {
document.forms.donateForm.classList.add( 'annual-enabled' );
}
return annualEnabled;
};
/**
* Change the amount options on the donation form
* @param {array} newAmounts
*/
donationForm.setAmountOptions = function( newAmounts ) {
for (var j = 0; j < newAmounts.length; j++) {
var $radio = $( `#input_amount_${j}` );
var $label = $( `label[for="input_amount_${j}"]` );
$radio.val( newAmounts[j] );
$label.text( donationForm.formatCurrency( newAmounts[j] ) );
}
};
/**
* Get the current amount options e.g. to store original amounts before changing them
* @returns {array} Array of amounts as numbers
*/
donationForm.getAmountOptions = function() {
let amounts = [];
document.querySelectorAll('input[name="amount"]').forEach( (input) => {
let amount = parseFloat( input.value );
if ( !isNaN( amount ) ) {
amounts.push( amount );
}
} );
return amounts;
};
/*
Based on github:braintree/braintree-web/src/venmo/shared/supports-venmo.js
See also on meta: MediaWiki:FundraisingBanners/VenmoBrowserCheck.js
*/
donationForm.isVenmoSupported = function(options) {
var options = options || {
allowNewBrowserTab: false,
allowWebviews: true,
allowDesktop: true,
allowDesktopWebLogin: true
};
var ua = window.navigator.userAgent;
var merchantAllowsReturningToNewBrowserTab,
merchantAllowsWebviews,
merchantAllowsDesktopBrowsers;
var isMobileDevice = isAndroid() || isIos();
var isAndroidChrome = isAndroid() && isChrome();
var isMobileDeviceThatSupportsReturnToSameTab = isIosSafari() || isAndroidChrome;
var isKnownUnsupportedMobileBrowser = isIosChrome() || isFacebookOwnedBrowserOnAndroid() || isSamsung();
options = options || {};
// NEXT_MAJOR_VERSION allowDesktop will default to true, but can be opted out
merchantAllowsDesktopBrowsers =
(options.allowDesktopWebLogin || options.allowDesktop) === true;
merchantAllowsReturningToNewBrowserTab = options.hasOwnProperty(
"allowNewBrowserTab"
)
? options.allowNewBrowserTab
: true;
// NEXT_MAJOR_VERSION webviews are not supported, except for the case where
// the merchant themselves is presenting venmo in a webview using the deep
// link url to get back to their app. For the next major version, we should
// just not have this option and instead require the merchant to determine
// if the venmo button should be displayed when presenting it in the
// merchant's app via a webview.
merchantAllowsWebviews = options.hasOwnProperty("allowWebviews")
? options.allowWebviews
: true;
if (isKnownUnsupportedMobileBrowser) {
return false;
}
if (
!merchantAllowsWebviews &&
(isAndroidWebview() || isIosWebview())
) {
return false;
}
if (!isMobileDevice) {
return merchantAllowsDesktopBrowsers;
}
if (!merchantAllowsReturningToNewBrowserTab) {
return isMobileDeviceThatSupportsReturnToSameTab;
}
return isMobileDevice;
/* -- functions mostly from github:braintree/browser-detection library -- */
function isAndroid() {
return /Android/i.test(ua);
}
function isIos(checkIpadOS = true) {
const iOsTest = /iPhone|iPod|iPad/i.test(ua);
return checkIpadOS ? iOsTest || isIpadOS() : iOsTest;
}
function isIpadOS() {
// "ontouchend" is used to determine if a browser is on an iPad, otherwise
// user-agents for iPadOS behave/identify as a desktop browser
return /Mac|iPad/i.test(ua) && "ontouchend" in window.document;
}
function isEdge() {
return ua.indexOf("Edge/") !== -1 || ua.indexOf("Edg/") !== -1;
}
function isSamsung() {
return /SamsungBrowser/i.test(ua);
}
function isDuckDuckGo() {
return ua.indexOf("DuckDuckGo/") !== -1;
}
function isOpera() {
return (
ua.indexOf("OPR/") !== -1 ||
ua.indexOf("Opera/") !== -1 ||
ua.indexOf("OPT/") !== -1
);
}
function isSilk() {
return ua.indexOf("Silk/") !== -1;
}
function isChrome() {
return (
(ua.indexOf("Chrome") !== -1 || ua.indexOf("CriOS") !== -1) &&
!isEdge() &&
!isSamsung() &&
!isDuckDuckGo() &&
!isOpera() &&
!isSilk()
);
}
function isIosFirefox() {
return /FxiOS/i.test(ua);
}
function isWebkit() {
const webkitRegexp = /webkit/i;
return webkitRegexp.test(ua);
}
function isIosChrome() {
return ua.indexOf("CriOS") > -1;
}
function isFacebook() {
return ua.indexOf("FBAN") > -1;
}
function isIosSafari() {
return (
isIos() &&
isWebkit() &&
!isIosChrome() &&
!isIosFirefox() &&
!isFacebook()
);
}
function isFacebookOwnedBrowserOnAndroid() {
var e = ua.toLowerCase();
return -1 < e.indexOf("huawei") && -1 < e.indexOf("fban") || isAndroid() && (-1 < e.indexOf("fb_iab") || -1 < e.indexOf("instagram"));
}
function isSamsungBrowser() {
return /SamsungBrowser/i.test(ua);
}
function isAndroidWebview() {
return isAndroid() && -1 < ua.toLowerCase().indexOf("wv");
}
function isGoogleSearchApp() {
return /\bGSA\b/.test(ua);
}
function isIosGoogleSearchApp() {
return isIos() && isGoogleSearchApp();
}
function isIosWebview() {
if (isIos()) {
// The Google Search iOS app is technically a webview and doesn't support popups.
if (isIosGoogleSearchApp()) {
return true;
}
// Historically, a webview could be identified by the presence of AppleWebKit and _no_ presence of Safari after.
return /.+AppleWebKit(?!.*Safari)/i.test(ua);
}
return false;
}
};
/* End form functions */
$(document).ready(function() {
mw.loader.using( ['mediawiki.util'] ).done( function() {
var form = document.forms.donateForm;
// Minimum amount is usually about 1 USD
donationForm.minLocal = donationForm.currencyRates[ donationForm.currency ];
donationForm.minLocal = Math.ceil( donationForm.minLocal * 100 ) / 100; // Round it up
donationForm.maxUSD = 25000;
donationForm.maxLocal = Math.floor( donationForm.currencyRates[ donationForm.currency ] * donationForm.maxUSD );
// Overrides for India
if ( donationForm.currency === 'INR' ) {
donationForm.minLocal = 10;
// Until https://phabricator.wikimedia.org/T370583 fixed?
donationForm.maxUSD = 3000;
donationForm.maxLocal = 250000;
}
// Block typing symbols in Other field
donationForm.otherInputControl( document.getElementById('input_amount_other_box') );
// Clear errors and update fee when selected/entered
$('.amount-options').on( 'input change', function() {
// Ideally we would validate the amount, but this causes issues with focus
$('.amount-options .lp-error').hide();
donationForm.updateFeeDisplay();
});
// Disable submitting form with Enter key
$('form[name="donateForm"]').on('keypress', function(e) {
var code = ( e.keyCode ? e.keyCode : e.which );
if ( code == 13 ) {
e.preventDefault();
}
});
// But allow Enter on buttons
$('.payment-method-button').keyup(function(e) {
if (event.keyCode === 13) {
e.target.click();
}
});
if ( form ) {
donationForm.initAnnualRecurring();
// hide frequency options for some countries
if ( donationForm.noRecurringCountries.includes( donationForm.country ) ) {
$('#frequency_onetime').prop('checked', true);
$('.frequency-options, #cancel-monthly, #donate-recurring-smallprint').hide();
}
if ( donationForm.noRecurringPaypalCountries.includes( donationForm.country ) ) {
$( '.paymentmethod-pp, .paymentmethod-pp-usd' ).addClass( 'not-monthly-capable' );
}
// Format amounts on buttons
$( '.amount-options li' ).each( function( index ) {
let amount = this.querySelector( 'input' ).value;
if ( amount !== 'Other' ) {
this.querySelector( 'label' ).innerText = donationForm.formatCurrency( amount );
}
});
addCardTypesClass( donationForm.country );
// Only show Amazon for links from Ways to give
if (
mw.util.getParamValue( 'wmf_source' ) === 'Waystogive' ||
mw.util.getParamValue( 'wmf_source' ) === 'Ways_to_Give'
) {
$('.paymentmethod-amazon').show();
}
// Only show DAF for certain Major Gifts links
if ( mw.util.getParamValue( 'wmf_campaign' ) === 'MG2WIR25' ) {
$('.paymentmethod-daf').show();
} else {
$('.paymentmethod-daf').hide();
}
// Apple Pay
if ( $('.paymentmethod-applepay').length > 0 ) {
if ( !donationForm.shouldShowApplePay( donationForm.country ) ) {
$('.paymentmethod-applepay').remove();
}
}
// Venmo browser check
if ( $('.paymentmethod-venmo').length > 0 ) {
if ( !donationForm.isVenmoSupported() || donationForm.country !== 'US' ) {
$('.paymentmethod-venmo').remove();
}
}
// Hide Google Pay if people are coming from iOS app https://phabricator.wikimedia.org/T411504
if ( mw.util.getParamValue('wmf_campaign') === 'iOS' ) {
$('.paymentmethod-google').remove();
}
}
// Links open in new tab
$('.links-in-new-tab a').attr('target', '_blank');
// Disable logo link
$('#p-logo a').attr( { href: '#', title: '' } );
// These don't need to be tabbable on the landing page
$('#searchInput, .mw-jump-link').attr('tabindex', '-1');
$('.input_amount_other').click(function() {
$('#input_amount_other_box').focus();
});
// Allow preselecting frequency if possible
if (
!donationForm.noRecurringCountries.includes( donationForm.country )
&& mw.util.getParamValue( 'utm_medium' ) !== 'endowment'
&& mw.util.getParamValue( 'wmf_medium' ) !== 'endowment'
) {
if ( mw.util.getParamValue( 'frequency' ) ) {
donationForm.setFrequency( mw.util.getParamValue( 'frequency' ) );
} else if ( mw.util.getParamValue('monthly') && mw.util.getParamValue('monthly') !== '0' ) {
// old method with "monthly=" parameter
donationForm.setFrequency( 'monthly' );
} else {
donationForm.setFrequency( 'onetime' );
}
}
// If we are emailing them and they have a contact_id, then we can assume they have opted in,
// unless this is a "Remind Me Later" email, or they are in a stricter country
let hasContactId = mw.util.getParamValue( 'contact_id' ) !== null;
let isRML = mw.util.getParamValue( 'wmf_campaign' ) && mw.util.getParamValue( 'wmf_campaign' ).includes( 'RMLEmail' );
let isStrictCountry = [ 'AT', 'IT' ].includes( donationForm.country );
if ( document.getElementById('optin-yes') && hasContactId && !isRML && !isStrictCountry ) {
document.getElementById('optin-yes').checked = true;
document.querySelector('.optin-options').style.display = 'none';
}
donationForm.initOptin();
try {
adjustHPC();
adjustMinAmounts();
// Store original amounts to switch back later if needed
donationForm.originalAmounts = donationForm.getAmountOptions();
preSelect(); // Make sure to do this *after* other fiddling with values
preSelectBox();
donationForm.localizeErrors();
}
finally {
$('.frb-monthly-pitch, .frb-monthly-pitch-thanks, .frb-recurring-pitch').appendTo('.frequency-options');
$('.ptf').appendTo('.amount-options');
$('.optin-options').insertAfter('.amount-options');
$('.consider-amounts').show();
$('#actual-form').show();
$('#actual-form-loading').hide();
}
});
});
56p2yj6wbli23ixc2crq9ttche62azn
File:Jimmy-wales-annenberg-circle.png
6
9790
42989
40516
2026-08-19T09:27:34Z
PPenloglou-WMF
52
PPenloglou-WMF uploaded a new version of [[File:Jimmy-wales-annenberg-circle.png]]
40516
wikitext
text/x-wiki
== Summary ==
https://commons.wikimedia.org/wiki/File:Jimmy_Wales_at_Annenberg_Institute_of_Art.jpg
== Licensing ==
{{CC-by-sa-3.0}}
tk9xjb67ej6zqfdd2zq16f407w9hsik
File:Erica Roden Portrait Square.jpeg
6
10449
42987
2026-08-19T00:35:55Z
LLugo-WMF
59
https://commons.wikimedia.org/wiki/File:Erica_Roden_portrait_2023_3.jpg
42987
wikitext
text/x-wiki
== Summary ==
https://commons.wikimedia.org/wiki/File:Erica_Roden_portrait_2023_3.jpg
hgpae0k5n3bx9rmjih03n6dopqw5bj7
File:Sam Portrait Square.jpg
6
10450
42988
2026-08-19T00:48:21Z
LLugo-WMF
59
https://commons.wikimedia.org/wiki/File:Wikimania_2026_%E2%80%93_Johan_%E2%80%93_139.jpg
42988
wikitext
text/x-wiki
== Summary ==
https://commons.wikimedia.org/wiki/File:Wikimania_2026_%E2%80%93_Johan_%E2%80%93_139.jpg
sfbrxpv9pn9i7bm51srx2jfy5f8jvoq
File:Jimmy-wales-annenberg-square.jpg
6
10451
42990
2026-08-19T09:28:49Z
PPenloglou-WMF
52
https://commons.wikimedia.org/wiki/File:Jimmy_Wales_at_Annenberg_Institute_of_Art.jpg
42990
wikitext
text/x-wiki
== Summary ==
https://commons.wikimedia.org/wiki/File:Jimmy_Wales_at_Annenberg_Institute_of_Art.jpg
94d652rlbq0j409ph2pezhnrvi8mp4s
File:Erica-roden-portrait-2023-circle.png
6
10452
42991
2026-08-19T10:09:50Z
PPenloglou-WMF
52
https://commons.wikimedia.org/wiki/File:Erica_Roden_portrait_2023_3.jpg
42991
wikitext
text/x-wiki
== Summary ==
https://commons.wikimedia.org/wiki/File:Erica_Roden_portrait_2023_3.jpg
== Licensing ==
{{CC-by-sa-4.0}}
792skona2f5wvb8lno6wy0th4x1xo76
File:Erica-roden-portrait-2023-square.jpg
6
10453
42992
2026-08-19T10:10:07Z
PPenloglou-WMF
52
https://commons.wikimedia.org/wiki/File:Erica_Roden_portrait_2023_3.jpg
42992
wikitext
text/x-wiki
== Summary ==
https://commons.wikimedia.org/wiki/File:Erica_Roden_portrait_2023_3.jpg
== Licensing ==
{{CC-by-sa-4.0}}
792skona2f5wvb8lno6wy0th4x1xo76
File:Erica-roden-portrait-2023-hero.jpg
6
10454
42993
2026-08-19T10:12:06Z
PPenloglou-WMF
52
https://commons.wikimedia.org/wiki/File:Erica_Roden_portrait_2023_3.jpg
42993
wikitext
text/x-wiki
== Summary ==
https://commons.wikimedia.org/wiki/File:Erica_Roden_portrait_2023_3.jpg
== Licensing ==
{{CC-by-sa-4.0}}
792skona2f5wvb8lno6wy0th4x1xo76
File:Sam-patton-wikimania-2026-circle.png
6
10455
42994
2026-08-19T10:13:30Z
PPenloglou-WMF
52
https://commons.wikimedia.org/wiki/File:Wikimania_2026_%E2%80%93_Johan_%E2%80%93_139.jpg
42994
wikitext
text/x-wiki
== Summary ==
https://commons.wikimedia.org/wiki/File:Wikimania_2026_%E2%80%93_Johan_%E2%80%93_139.jpg
== Licensing ==
{{CC-by-sa-4.0}}
qs74jit6petbl9jof4t6bbj3pezwr3u
File:Sam-patton-wikimania-2026-square.jpg
6
10456
42995
2026-08-19T10:13:56Z
PPenloglou-WMF
52
https://commons.wikimedia.org/wiki/File:Wikimania_2026_%E2%80%93_Johan_%E2%80%93_139.jpg
42995
wikitext
text/x-wiki
== Summary ==
https://commons.wikimedia.org/wiki/File:Wikimania_2026_%E2%80%93_Johan_%E2%80%93_139.jpg
== Licensing ==
{{CC-by-sa-4.0}}
qs74jit6petbl9jof4t6bbj3pezwr3u
File:Sam-patton-wikimania-2026-hero.jpg
6
10457
42996
2026-08-19T10:14:17Z
PPenloglou-WMF
52
https://commons.wikimedia.org/wiki/File:Wikimania_2026_%E2%80%93_Johan_%E2%80%93_139.jpg
42996
wikitext
text/x-wiki
== Summary ==
https://commons.wikimedia.org/wiki/File:Wikimania_2026_%E2%80%93_Johan_%E2%80%93_139.jpg
== Licensing ==
{{CC-by-sa-4.0}}
qs74jit6petbl9jof4t6bbj3pezwr3u