Jump to content

MediaWiki:Common.js: Difference between revisions

From Once Human Guide
No edit summary
No edit summary
Line 1: Line 1:
mw.loader.using('mediawiki.util').then(function () {
mw.loader.using('mediawiki.util').then(function () {
     $(function () {
     $(function () {
        // 🔹 Replace "Discussion" with Discord
         const talkLink = document.querySelector('#ca-talk a');
         const talkLink = document.querySelector('#ca-talk a');


Line 14: Line 16:
             });
             });
         }
         }
        // 🔥 ADD NEW TAB → Road Map
        mw.util.addPortletLink(
            'p-views', // THIS puts it in the top tab bar
            'https://ohwikiguide.com/index.php/Road_Map',
            'Road Map',
            'ca-roadmap',
            'View the Road Map'
        );
     });
     });
});
});

Revision as of 20:03, 8 April 2026

mw.loader.using('mediawiki.util').then(function () {
    $(function () {

        // 🔹 Replace "Discussion" with Discord
        const talkLink = document.querySelector('#ca-talk a');

        if (talkLink) {
            talkLink.textContent = 'Discord';
            talkLink.href = 'https://discord.gg/FZtkXeGeUA';
            talkLink.target = '_blank';
            talkLink.rel = 'noopener noreferrer';

            talkLink.addEventListener('click', function (e) {
                e.preventDefault();
                window.open('https://discord.gg/FZtkXeGeUA', '_blank');
            });
        }

        // 🔥 ADD NEW TAB → Road Map
        mw.util.addPortletLink(
            'p-views', // THIS puts it in the top tab bar
            'https://ohwikiguide.com/index.php/Road_Map',
            'Road Map',
            'ca-roadmap',
            'View the Road Map'
        );

    });
});