MediaWiki:Common.js

From Translate Science

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* 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/';