MediaWiki:DonationForm.js: Difference between revisions

Content deleted Content added
rv
Tag: Manual revert
Dynamically add extra paragraph in footer relating to donor privacy policy third party providers. Used when FundraiseUp is used.
Tag: Reverted
Line 1,499:
 
});
 
// Check if the 'fundraiseupScript' parameter exists in the URL and is '1'
if (mw.util.getParamValue('fundraiseupScript') === '1') {
// Insert the Privacy Third Party template https://donate.wikimedia.org/wiki/Template:Footer/PrivacyThirdParty/Default
mw.loader.using('mediawiki.api').then(function() {
new mw.Api().get({
action: 'parse',
page: 'Template:Footer/PrivacyThirdParty/Default',
prop: 'text',
format: 'json'
}).done(function(data) {
if (data.parse && data.parse.text) {
// And place it right after <div id="donate-privacy"> in the Footer.
$('#donate-privacy').after(data.parse.text['*']);
}
});
});
}