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.
mw.loader.using('mediawiki.util').then(function () {
$(function () {
// Change Discussion tab to Discord
const talkTab = document.querySelector('#ca-talk a');
if (talkTab) {
talkTab.textContent = 'Discord';
talkTab.href = 'https://discord.gg/FZtkXeGeUA';
talkTab.target = '_blank';
talkTab.rel = 'noopener noreferrer';
talkTab.addEventListener('click', function (e) {
e.preventDefault();
window.open('https://discord.gg/FZtkXeGeUA', '_blank');
});
}
// Add Road Map tab
const tabList = document.querySelector('#p-associated-pages .vector-menu-content-list, #p-namespaces .vector-menu-content-list');
if (tabList && !document.getElementById('ca-roadmap')) {
const li = document.createElement('li');
li.id = 'ca-roadmap';
li.className = 'mw-list-item';
const a = document.createElement('a');
a.href = 'https://ohwikiguide.com/index.php/Road_Map';
a.textContent = 'Road Map';
a.title = 'Road Map';
li.appendChild(a);
tabList.appendChild(li);
}
});
});