Difference between revisions of "MediaWiki:Common.js"
From Translate Science
(Make the link in the header go to our homepage (not the wiki).) |
(added explanation) |
||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
+ | |||
+ | /* This changes the link with our name (at the left of the top/banner/header) from going to the wiki to going our homepage, so that people (who came from our homepage to our Wiki) can find our homepage (the way back). The logo still links to the main page of the Wiki. | ||
+ | |||
+ | The link a href has as ID p-banner. So the left hand side searchers for all links with ID p-bannner and the right hand side replaced it with the link to our homepage. A bit hacky but it works. This should be a setting, but I cannot find it. */ | ||
document.getElementById('p-banner').href = 'https://translatescience.org/'; | document.getElementById('p-banner').href = 'https://translatescience.org/'; |
Latest revision as of 17:32, 28 March 2021
/* Any JavaScript here will be loaded for all users on every page load. */ /* This changes the link with our name (at the left of the top/banner/header) from going to the wiki to going our homepage, so that people (who came from our homepage to our Wiki) can find our homepage (the way back). The logo still links to the main page of the Wiki. The link a href has as ID p-banner. So the left hand side searchers for all links with ID p-bannner and the right hand side replaced it with the link to our homepage. A bit hacky but it works. This should be a setting, but I cannot find it. */ document.getElementById('p-banner').href = 'https://translatescience.org/';