MediaWiki:Common.js
Appearance
Note: After publishing, 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)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Any JavaScript here will be loaded for all users on every page load. */
/* Add StarSim socials links to the wiki sidebar */
const starsimLinks = [
{text: 'Website', url: 'https://starshipsimulator.co.uk/', id: 'starsim-link-website'},
{text: 'Steam', url: 'https://store.steampowered.com/app/1332100/Starship_Simulator/', id: 'starsim-link-steam'},
{text: 'Discord', url: 'https://discord.gg/starshipsimulator', id: 'starsim-link-discord'},
{text: 'Ko-fi', url: 'https://ko-fi.com/starshipsimulator', id: 'starsim-link-kofi'},
{text: 'Kickstarter', url: 'https://www.kickstarter.com/projects/fleetyard/starship-simulator', id: 'starsim-link-kickstarter'},
{text: 'YouTube', url: 'https://www.youtube.com/@StarshipSimulator', id: 'starsim-link-youtube'},
{text: 'X (Twitter)', url: 'https://x.com/Starship_sim', id: 'starsim-link-twitter'},
{text: 'Facebook', url: 'https://www.facebook.com/Starshipgame', id: 'starsim-link-facebook'},
];
const starsimLinksPortletId = 'p-starsim-links';
const starsimLinksPortlet = mw.util.addPortlet(starsimLinksPortletId, 'Links', '#p-tb');
starsimLinks.forEach(linkObj => {
mw.util.addPortletLink(starsimLinksPortletId, linkObj.url, linkObj.text, linkObj.id);
});