MediaWiki:Common.js: Difference between revisions
Appearance
Created page with "document.addEventListener("DOMContentLoaded", function () { const talkTab = document.querySelector('#ca-talk a'); if (talkTab) { talkTab.href = "https://discord.gg/FZtkXeGeUA"; talkTab.target = "_blank"; talkTab.textContent = "Discord"; } });" |
No edit summary |
||
| Line 1: | Line 1: | ||
mw.loader.using('mediawiki.util').then(function () { | |||
const | $(function () { | ||
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'); | |||
}); | |||
} | |||
}); | |||
}); | }); | ||
Latest revision as of 11:59, 2 April 2026
mw.loader.using('mediawiki.util').then(function () {
$(function () {
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');
});
}
});
});