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

From Donate
Jump to navigation Jump to search
Content deleted Content added
huh, it did work, problem was just caching I think
No edit summary
Line 50: Line 50:
// 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
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?';
var baseURL = 'https://donate.wikimedia.org/wiki/Special:FundraiserLandingPage?';


var paramsOut = paramsIn;
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);

Revision as of 23:26, 25 January 2012