MediaWiki:ThankYouPage.js: Difference between revisions

From Donate
Jump to navigation Jump to search
Content deleted Content added
move share hints here from Template:Thank You 2018/js
duh, wrong site. update with a comment pointing to the right one
Tag: Replaced
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
/*
mw.loader.using( 'mediawiki.util', function() {
Thank you mario, but our thank you page is in another wiki! https://thankyou.wikipedia.org/

And the javascript is at https://thankyou.wikipedia.org/wiki/MediaWiki:Common.js
var paymentMethod = mw.util.getParamValue('payment_method'),
*/
country = mw.util.getParamValue('country');

if ( paymentMethod === 'bt' ) {
document.getElementById('ty-banktransfer').style.display = 'block';
}
if ( paymentMethod === 'bitcoin' ) {
document.getElementById('ty-bitcoin').style.display = 'block';
}
if ( paymentMethod === 'bpay' ) {
document.getElementById('ty-bpay').style.display = 'block';
}

if ( country === 'US' || country === 'CA' ) {
document.getElementById('ty-store').style.display = 'block';
}

});

// Hint to click a share button when icon is clicked
document.getElementsByClassName('ty-share')[0].addEventListener('click', function() {
var primaryClick = this;
primaryClick.classList.add('highlight');
setTimeout(function() {
primaryClick.classList.remove('highlight');
}, 400);
});

Latest revision as of 16:52, 4 June 2024

/*
Thank you mario, but our thank you page is in another wiki! https://thankyou.wikipedia.org/
And the javascript is at https://thankyou.wikipedia.org/wiki/MediaWiki:Common.js
*/