Template:2011FR/Form-section-links: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
$(document).ready |
||
Line 36: | Line 36: | ||
// This piece of script is add to preserve the layout of the page when the user is sent to monthly donation page |
// 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 |
// parseParams is defined in MediaWiki:Common.js |
||
$(document).ready(function() { |
|||
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 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?'; |
var baseURL = 'https://donate.wikimedia.org/wiki/Special:FundraiserLandingPage?'; |
||
paramsOut['form-countryspecific'] = 'Form-countryspecific-monthly'; |
paramsOut['form-countryspecific'] = 'Form-countryspecific-monthly'; |
||
document.getElementById('monthly-link').href = baseURL + $.param(paramsOut); |
document.getElementById('monthly-link').href = baseURL + $.param(paramsOut); |
||
}); |
|||
</script> |
</script> |
||
</html> |
</html> |