Thank You
thankyouwiki
https://thankyou.wikipedia.org/wiki/Main_Page
MediaWiki 1.47.0-wmf.13
first-letter
Media
Special
Talk
User
User talk
Thank You
Thank You talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
TimedText
TimedText talk
Module
Module talk
Thank You/hu
0
16
1489
1486
2026-07-29T12:50:01Z
EHughes (WMF)
9
Adding edit CTA messages
1489
wikitext
text/x-wiki
{{Thank You 2021
| language = hu
| title = Köszönjük a felajánlást!
| header-new = Köszönjük! A Wikipédia iránti nagylelkűséged nagyon sokat jelent a számunkra.
| receipt = Adományod feldolgozásáról megerősítő e-mailt küldünk.
| receipt-bitcoin = A bitcoin-adományok átvételi elismervényének visszaérkezéséhez 3–7 munkanap szükséges.
| monthly-conversion = Küldünk majd neked egy második számlát az ismétlődő adományodról, amelynek feldolgozása a jövő hónapban kezdődik meg.
| annual-conversion = Küldünk majd neked egy második számlát az ismétlődő adományodról, amelynek feldolgozása jövőre ugyanazon a napon kezdődik meg.
| annual-organic = Az adományodat évente ugyanazon a napon vonjuk majd le, és minden alkalommal elküldjük neked az erről szóló számlát.
| tax-disclaimer-default = A Wikimedia Foundation egy nemzetközi nonprofit szervezet, amely világszerte támogatja a helyi és független egyesületeket. <strong> Adómentességünk az egyes országok jogszabályaitól függően eltérő. A Wikimedia Foundation számára nyújtott adományok az Egyesült Államokon kívül valószínűleg nem vonhatók le az adóból.</strong> Ha bármilyen kérdésed van az adómentességekkel vagy adócsökkentésekkel kapcsolatban, kérjük, írj a [mailto:donate@wikimedia.org donate@wikimedia.org] címre.
| cookie-explain = Nagyra értékeljük támogatásod, és igyekszünk elkerülni, hogy a hozzád hasonló adományozók további adománygyűjtő üzeneteket kapjanak. Ha törlöd a böngésző cookie-jait, vagy más eszközről látogatod meg az oldalt, előfordulhat, hogy továbbra is további hirdetési sávok jelennek meg. Ha kimásolod az oldal linkjét, és azt más eszközön megnyitod, a hirdetési sávok eltűnnek.
| header-text1 = A hozzád hasonló olvasók hozzájárulásai segítenek nekünk a [https://wikimediafoundation.org/what-we-do/wikimedia-projects/ Wikipédia és más ingyenes tudásprojektek üzemeltetésében].
| header-text2 =
| share-text = Szólj másoknak is! Mondd el családodnak és barátaidnak, hogy támogatod a Wikipédiát.
| share = Megosztás
| share-facebook-alt = Megosztás a Facebookon
| share-twitter = Tweet
| share-twitter-alt = Megosztás a Twitteren
| share-message = Épp most adakoztam a @Wikipedia számára. Támogasd te is az ingyenes tudást! #szeretemaWikipédiát
<!--
| survey-code = 8GLZH2Z
| survey-header = Vegyél részt a felmérésünkben
| survey-text = Segíts a Wikipédia fejlesztésében azzal, hogy megválaszolod felmérésünk kérdéseit.
| survey-legal = A jelen felmérést harmadik fél szolgáltató biztosítja. Az adatvédelemre és az adatkezeléssel kapcsolatos információkért kérjük, tekintsd meg a [[wmf:Donor Thank You Survey Privacy Statement/hu|felmérés adatvédelmi nyilatkozatát]].
| survey-button = Felmérés elindítása
-->
| match-header = Vállalati kiegészítés
| match-text = Duplázd meg a hatást: nézz utána, hogy vállalatod rendelkezik-e adománykiegészítő programmal.
| match-button = Ellenőrizd a munkáltatódat
| store-header = Vásárolj Wikipédia-termékeket
| store-text-new = Ültesd el a tudás magját a Wikipédia témájú ajándék vásárlásával a boltunkban. A termékértékesítésből befolyt összegekből köszönjük meg az önkénteseknek, hogy lehetővé teszik a Wikipédia működését.
| store-button = Wikipédia vásárlás
| endowment-header = Tudj meg többet
| endowment-title = Az ingyenes tudás jövőjének biztosítéka: a Wikimédia-adomány.
| endowment-text = A Wikimédia-adomány célzott támogatásokat nyújt az ingyenes tudás jövőjének megőrzéséhez, továbbépítéséhez és támogatásához, hogy az a jövő generációi számára is elérhető legyen.
| chapter-HU-title = [https://wikimedia.hu/ Wikimédia Magyarország Egyesület]
| chapter-HU-text = A Wikimédia Magyarország Egyesület egy helyi, jogilag önálló egyesület, amely a Wikimedia Foundationnel együttműködve támogatja a Wikipédiát és más szabad tudásalapú projekteket.
| chapter-HU-link = [https://wikimedia.hu/ <span class="btn btn-blue stick-to-bottom">Tudj meg többet</span>]
| editing-header = Próbáld ki a Wikipédia szerkesztését
| editing-text = A Wikipédia szerkesztése egyszerűbb, mint gondolnád! Az első lépéseidhez segítséget és javaslatokat fogsz kapni, és a tudásbővítés akár olyan könnyű is lehet, mint például egy helyesírási hiba javítása vagy egy hivatkozás hozzáadása.
| editing-button = Regisztrálj egy fiókot
| return = Visszatérés a Wikipédiára
| chapters = Tudj meg többet a [[m:Wikimedia chapters/hu|helyi szervezetekről és projektjeikről]].
| questions = Kérdés esetén írj a következő e-mail-címre: [mailto:donate@wikimedia.org donate@wikimedia.org].
| terms = A lap szövege a [https://creativecommons.org/licenses/by-sa/4.0/deed.hu Creative Commons Nevezd meg! – Így add tovább] 4.0 licenc alatt van; egyes esetekben más módon is felhasználható. Részletekért lásd a [https://foundation.wikimedia.org/wiki/Terms_of_Use felhasználási feltételeket] vagy az [https://meta.wikimedia.org/wiki/Privacy_policy/hu adatvédelmi szabályzatot].
}}
hoqxdt783r3do9y85qjazqmm75093un
MediaWiki:Common.js
8
32
1488
1485
2026-07-29T12:49:02Z
EHughes (WMF)
9
Adding edit URL for HU
1488
javascript
text/javascript
/* Any JavaScript here will be loaded for all users on every page load. */
// Framebuster for https://phabricator.wikimedia.org/T176669
if ( self !== top ) {
top.location.href = window.location;
}
// Redirect anons to en if page doesn't exist
if ( mw.config.get('wgUserName') === null && mw.config.get('wgArticleId') === 0 ) {
var basePageName = mw.config.get('wgPageName').split('/')[0];
var redirectUrl = 'https://thankyou.wikipedia.org/wiki/';
if ( basePageName === 'Recurring_donor_page' ) {
redirectUrl += 'Recurring_donor_page/en';
} else if ( basePageName === 'WP25' ) {
redirectUrl += 'WP25/en';
} else {
redirectUrl += 'Thank_You/en';
}
redirectUrl += window.location.search; // params
window.location.replace( redirectUrl );
}
mw.loader.using( [ 'mediawiki.cookie' ], function() {
/**
* Extend a url with a subset of query parameters
*
* @param {string} url Base url to extend
* @param {object} allParams Object with all available query parameters (usually for the current location)
* @param {array} paramsToInclude List of parameters to include in the extended url
* @return {string} Extended url
*/
function extendWithSomeParams( url, allParams, paramsToInclude ) {
var urlObject = new URL( url );
// Fallback for survey links
allParams.wmf_medium = allParams.wmf_medium || allParams.utm_medium;
allParams.wmf_campaign = allParams.wmf_campaign || allParams.utm_campaign;
allParams.wmf_source = allParams.wmf_source || allParams.utm_source;
paramsToInclude.forEach( function(key) {
if ( allParams[key] ) {
urlObject.searchParams.set( key, allParams[key] );
}
});
return urlObject.toString();
}
/* -- Start of main TY page code -- */
var params = {};
for ( const [key, value] of new URLSearchParams( location.search ) ) {
params[key] = value;
}
var country = params.country,
pageLanguage = mw.config.get('wgPageName').split('/')[1];
if ( params.recurring === '1' ) {
document.getElementById('ty-recurringOrganic').style.display = 'block';
}
if ( params.recurring === '1' && params.frequency_unit === 'year' ) {
document.getElementById('ty-recurringOrganic').style.display = 'none';
document.getElementById('ty-recurringOrganicAnnual').style.display = 'block';
}
if ( params.recurringConversion === '1' ) {
document.getElementById('ty-recurringConversion').style.display = 'block';
}
if ( params.recurringConversion === '1' && params.frequency_unit === 'year' ) {
document.getElementById('ty-recurringConversion').style.display = 'none';
document.getElementById('ty-recurringConversionAnnual').style.display = 'block';
}
// Recurring Upgrade
if ( params.recurUpgrade === '1' ) {
var recurUpgradeAmt = params.recurAmount;
var recurUpgradeDate = params.recurDate;
$('.recurUpgrade-yes').show();
if ( recurUpgradeAmt && recurUpgradeDate ) {
$('.recurUpgradeAmt').text(recurUpgradeAmt);
if ( params.country === 'US' ) {
$('.recurUpgradeAmt').prepend("$");
}
var upgradeDate = new Date(recurUpgradeDate);
var formatOptions = { timeZone: 'UTC', weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
$('.recurUpgradeDate').text( upgradeDate.toLocaleDateString('en-US', formatOptions) );
$('.recurUpgrade-receipt').show();
} else {
$('.recurUpgrade-receipt').hide();
}
} else if ( params.recurUpgrade === '0' ) {
$('.recurUpgrade-no').show();
} else {
$('.ty-vision, .ty-text').show();
}
// Extend survey links
$('.ty-survey-link, a[href^="https://www.surveymonkey.com"]').attr('href', function( i, val ) {
return extendWithSomeParams( val, params, [ 'country', 'payment_method', 'recurring', 'recurringConversion', 'amount', 'currency', 'order_id', 'wmf_medium', 'wmf_campaign', 'wmf_source' ] );
});
// Return to Wikipedia link
var returnToUrl = mw.cookie.get( 'fundraising_returnTo', '' );
if ( returnToUrl ) {
$( '.ty-return a' ).attr( 'href', returnToUrl );
$( '.ty-return' ).show();
mw.cookie.set( 'fundraising_returnTo', null, { prefix: '', domain: '.wikipedia.org' } );
}
// TODO: refactor this to be by feature instead of country?
if ( params.featureEndowment ) {
// To force endowment feature
$( '.primary-ctas .endowment, \
.other-ctas, \
.other-ctas .store, \
.other-ctas .survey, \
.other-ctas .edit-6c' ).show();
} else if ( params.featureMatching ) {
// To force matching gifts feature
$( '.primary-ctas .matching, \
.other-ctas, \
.other-ctas .store, \
.other-ctas .will-US, \
.other-ctas .survey, \
.other-ctas .edit-6c' ).show();
} else if ( country === 'US' ) {
$( '.primary-ctas .endowment, \
.other-ctas, \
.other-ctas .store, \
.other-ctas .survey, \
.other-ctas .edit-6c' ).show();
} else if ( country === 'CA' || country === 'GB' ) {
$( '.primary-ctas .survey, \
.other-ctas, \
.other-ctas .store, \
.other-ctas .will-notUS, \
.other-ctas .edit-6c' ).show();
} else if ( country === 'IE' || country === 'AU' || country === 'NZ' ) {
$( '.primary-ctas .survey, \
.other-ctas, \
.other-ctas .store, \
.other-ctas .edit-6c' ).show();
} else if ( country === 'IT' || country === 'PT' || country === 'BR' || country === 'JP' || country === 'FR' ) {
$( '.primary-ctas .survey, \
.other-ctas, \
.other-ctas .store' ).show();
} else if ( country === 'ES' || country === 'CL' || country === 'CO' || country === 'MX' || country === 'PE' || country === 'UY' ) {
$( '.primary-ctas .survey, \
.other-ctas, \
.other-ctas .store' ).show();
} else if ( country === 'BE' || country === 'CZ' || country === 'NO' || country === 'AT' || country === 'DK' || country === 'PL' || country === 'HU' ) {
$( '.primary-ctas .survey, \
.other-ctas' ).show();
} else {
$( '.primary-ctas .survey' ).show();
}
if ( country === 'SE' ) {
$('.chapter-SE').show();
}
if ( country === 'CZ' ) {
$('.chapter-CZ').show();
}
if ( country === 'IT' ) {
$('.chapter-IT').show();
}
if ( country === 'AU' ) {
$('.chapter-AU').show();
}
if ( country === 'FR' ) {
$('.chapter-FR').show();
}
if ( country === 'GB' ) {
$('.chapter-GB').show();
}
if ( country === 'CA' ) {
$('.chapter-CA').show();
}
if ( country === 'NO' ) {
$('.chapter-NO').show();
}
if ( country === 'BE' ) {
$('.chapter-BE').show();
}
if ( country === 'NL' ) {
$('.chapter-NL').show();
}
if ( country === 'NZ' ) {
$('.chapter-NZ').show();
}
if ( country === 'AT' ) {
$('.chapter-AT').show();
}
if ( country === 'CO' ) {
$('.chapter-CO').show();
}
if ( country === 'MX' ) {
$('.chapter-MX').show();
}
if ( country === 'BR' ) {
$('.chapter-BR').show();
}
if ( country === 'UY' ) {
$('.chapter-UY').show();
$('.video-module-UY').show();
}
if ( country === 'PL' ) {
$('.chapter-PL').show();
}
if ( country === 'HU' ) {
$('.chapter-HU').show();
}
/* Wikiminute blocks */
if ( country === 'CL' || country === 'CO' || country === 'MX' || country === 'PE' || country === 'UY' ) {
$('.wikiminute-LATAM').show();
}
if ( country === 'ES' ) {
$('.wikiminute-ES').show();
}
if ( country === 'FR' ) {
$('.wikiminute-FR').show();
}
if ( country === 'AT' ) {
$('.wikiminute-DE').show();
}
if ( country === 'IT' ) {
$('.wikiminute-IT').show();
}
if ( country === 'BR' ) {
$('.wikiminute-ptBR').show();
}
if ( country === 'NL' ) {
$('.wikiminute-NL').show();
}
if ( country === 'DK' ) {
$('.wikiminute-DK').show();
}
if ( country === 'SE' ) {
$('.wikiminute-SV').show();
}
if ( country === 'NO' ) {
$('.wikiminute-NB').show();
}
if ( country === 'JP' ) {
$('.wikiminute-JA').show();
}
/* Tax deductibility disclaimer */
if ( country === 'US' ) {
$('.tax-disclaimer-US').show();
} else if ( country === 'NL' ) {
$('.tax-disclaimer-NL').show();
} else if ( country === 'FR' ) {
$('.tax-disclaimer-FR').show();
} else {
$('.tax-disclaimer-default').show();
}
/* -- "Try editing" feature -- */
var editingUrls = {
'IN': {
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-in-en-2022'
},
'ZA': {
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-za-en-2022'
},
// Latin America
'BR': {
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-en-2022',
'pt-br': 'https://pt.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-pt-2022&uselang=pt-br'
},
'AR': {
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-en-2022',
'es-419': 'https://es.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-es-2022'
},
'CL': {
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-en-2022',
'es-419': 'https://es.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-es-2022'
},
'CO': {
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-en-2022',
'es-419': 'https://es.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-es-2022'
},
'MX': {
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-en-2022',
'es-419': 'https://es.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-es-2022'
},
'PE': {
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-en-2022',
'es-419': 'https://es.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-es-2022'
},
'UY': {
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-en-2022',
'es-419': 'https://es.wikipedia.org/w/index.php?title=Special:CreateAccount&geEnabled=1&campaign=typage-latam-es-2022'
},
// Northern and Western Europe
'SE': {
'sv': 'https://sv.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-nwe-sv-2023',
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-nwe-sv-2023'
},
'IT': {
'it': 'https://it.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-nwe-it-2023',
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-nwe-it-2023'
},
'FR': {
'fr': 'https://fr.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-nwe-fr-2023',
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-nwe-fr-2023'
},
'NL': {
'nl': 'https://nl.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-nwe-nl-2023',
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-nwe-nl-2023'
},
// Central Europe
'PL': {
'pl': 'https://pl.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-ce-pl-2026',
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-ce-pl-2026'
},
'HU': {
'hu': 'https://hu.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-ce-hu-2026',
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-ce-hu-2026'
},
// East, Southeast Asia, and Pacific
'JP': {
'ja': 'https://ja.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-eseap-ja-2023',
'en': 'https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&campaign=typage-eseap-ja-2023'
},
};
// Separate list so we can have others in prep for proofing
var editingCTACountries = [ 'IN', 'ZA', 'BR', 'AR', 'CL', 'CO', 'MX', 'PE', 'UY',
'SE', 'IT', 'FR', 'NL', 'JP', 'PL', 'HU' ];
if ( editingCTACountries.indexOf(country) !== -1 || params.testEditingCTA ) {
if ( editingUrls[country] ) {
if ( editingUrls[country][pageLanguage] ) {
$( '.try-editing a' ).attr( 'href', editingUrls[country][pageLanguage] );
$( '.primary-ctas .survey' ).hide();
$( '.primary-ctas .try-editing, .other-ctas, .other-ctas .survey' ).show();
}
}
}
// Only show survey 25% of time on English page
//if ( pageLanguage === 'en' ) {
// if ( Math.random() > 0.25 ) {
// $('.survey').hide();
// }
//}
if ( pageLanguage === 'en' ) {
var surveyNumber = Math.random();
if ( surveyNumber > 0.5 ) {
$('.survey').hide();
} else if ( surveyNumber > 0.25 && surveyNumber <= 0.5 ) {
$('.survey-1').hide();
} else if ( surveyNumber > 0 && surveyNumber <= 0.25 ) {
$('.survey-2').hide();
}
}
// Don't show editing CTAs on apps: https://phabricator.wikimedia.org/T353023
if ( params.utm_medium === 'WikipediaApp' || params.wmf_medium === 'WikipediaApp' ) {
$('.other-ctas .edit-6c, .primary-ctas .try-editing').hide();
}
// Finally, if there are no secondary CTAs shown then hide the section header
if ( $('.other-ctas .focus-block:visible').length === 0 ) {
$('.other-ctas h2').hide();
}
// One Click Survey page show/hide CTAs
if ($('.ty-page').hasClass('one-click-survey')) {
if ( params.variant === 'donate' ) {
// To show donate CTA
$( '.other-ctas .donate, \
.other-ctas .store, \
.other-ctas .will-notUS' ).show();
} else {
// Show edit CTA
$( '.other-ctas .edit-6c, \
.other-ctas .store, \
.other-ctas .will-notUS' ).show();
}
}
// MGFE event invite show/hide
if ( ( params.wmf_campaign === 'MGYEA1R25' || params.wmf_campaign === 'MGYEA2R25' ) && params.wmf_medium === 'MGFE' ) {
$('.wp25-block').show();
}
if ( ( params.wmf_campaign === 'ENDYEA1R25' || params.wmf_campaign === 'ENDYEA2R25' ) && params.wmf_medium === 'endowment' ) {
$('.wp25-block').show();
}
// WP25 specific
if ( country === 'US' ) {
$('.wp25 .tax-disclaimer').hide();
}
// Show social media share & social media footer only in English
if ( pageLanguage === 'en' ) {
$( '.social-share' ).show();
$( '.social-footer' ).show();
}
/* -- Legacy giving form --- */
var lg = {
post: function( $form ) {
// Create iframe for the form and use it as the form's target
var frameName = 'lgFrame';
if ( $("iframe[name=" + frameName + "]").length === 0 ) {
var $iframe = $('<iframe style="display: none;" name="' + frameName + '"></iframe>');
$form.attr('target', $iframe.attr('name'));
$form.after($iframe);
}
$form[0].submit();
},
getCurrentDate: function() {
/* Get current date in correct format for Silverpop */
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; // January is 0!
var yyyy = today.getFullYear();
if( dd < 10 ) {
dd = '0' + dd;
}
if( mm < 10 ) {
mm = '0' + mm;
}
return mm+'/'+dd+'/'+yyyy;
},
init: function() {
var legacyForm = document.getElementById( 'lg-form' ),
legacyDialog = document.getElementById( 'frb-dialog-legacy' );
if ( !legacyForm ) {
return false;
}
// pre-fill country, only shown in US for now
legacyForm.country.value = 'United States';
legacyForm.lg_submitDate.value = lg.getCurrentDate();
$('.frb-dialog-link').on( 'click', function(e) {
legacyDialog.showModal();
legacyForm.firstname.focus();
});
$('#frb-dialog-legacy .frb-dialog-close').on( 'click', function(e) {
legacyDialog.close();
});
// form submit
$('#lg-form .lg-submit').on( 'click', function() {
var pdfUrl = "https://upload.wikimedia.org/wikipedia/donate/9/97/Wikipedia_Planned_Giving_Guide.pdf";
if ( legacyForm.checkValidity() ) {
lg.post( $('#lg-form') );
legacyDialog.close();
mw.notify( 'Thank you! Our team will be in touch.' );
window.open(pdfUrl, '_blank');
} else {
legacyForm.reportValidity();
}
return false;
});
}
};
lg.init();
/* -- donor badge dialog --- */
var donorBadge = {
init: function() {
var donorBadgeDialog = document.getElementById( 'frb-dialog-donor-badge' );
$('.getDonorBadge').on( 'click', function(e) {
donorBadge.setCookie();
donorBadgeDialog.showModal();
});
$('#frb-dialog-donor-badge .frb-dialog-close').on( 'click', function(e) {
donorBadgeDialog.close();
e.target.blur();
});
},
setCookie: function() {
const DONOR_BADGE_COOKIE_NAME = 'fundraising_donor_badge';
const DONOR_BADGE_COOKIE_OPTIONS = {
domain: 'wikipedia.org',
path: '/',
expires: 90 * 24 * 60 * 60 // 90 days
};
mw.loader.using( 'mediawiki.cookie' ).then( function () {
$.cookie( DONOR_BADGE_COOKIE_NAME, '1', DONOR_BADGE_COOKIE_OPTIONS );
});
}
};
donorBadge.init();
// hack to set page language based on template
const tyPage = document.querySelector( '.ty-page' );
if ( tyPage ) {
document.documentElement.lang = tyPage.lang || 'en';
}
});
if ( navigator.share ) {
$('#ty-web-share').click(function(e) {
var url = 'https://donate.wikimedia.org/?wmf_medium=SocialMedia&wmf_campaign=ThankYouPage&wmf_source=WebShare';
if ( $(this).data('share-language') ) {
url += '&uselang=' + $(this).data('share-language');
}
navigator.share({
text: $(this).data('share-text'),
url: url
});
e.preventDefault();
});
$('#ty-web-share').show();
}
/* Show all elements for testing and checking translations */
function tyDebug() {
$('.ty-page *:not(dialog)').show();
}
6nd8yj3ucby9p0zob940slvddka4kyr