Template:2011FR/Form-section-links: Difference between revisions

Content deleted Content added
No edit summary
$(document).ready
Line 36:
// This piece of script is add to preserve the layout of the page when the user is sent to monthly donation page
// parseParams is defined in MediaWiki:Common.js
$(document).ready(function() {
var paramsIn = parseParams(window.location.href);
var paramsIn = parseParams(window.location.href);
var paramsOut = parseParams(window.location.href); // note that 'paramsOut = paramsIn' won't work, it just creates a reference to paramsIn
var baseURL = 'https://donate.wikimedia.org/wiki/Special:FundraiserLandingPage?';
 
paramsOut['form-countryspecific'] = 'Form-countryspecific-monthly';
document.getElementById('monthly-link').href = baseURL + $.param(paramsOut);
});
</script>
</html>