MediaWiki:Common.js: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 20: | Line 20: | ||
wrap.style.alignItems = 'center'; | wrap.style.alignItems = 'center'; | ||
var links = [ | |||
{ text: 'GitHub', url: 'https://github.com/Lumenward' }, | |||
{ text: 'Discord', url: 'https://discord.gg/Kc9DtJUG' }, | |||
]; | |||
links.forEach(function (l) { | links.forEach(function (l) { | ||
Latest revision as of 21:38, 5 January 2026
/* =========================================================
Lumenward: Top header links (Vector 2022, SAFE)
Places GitHub + Discord next to the logo (left lane)
========================================================= */
mw.loader.using(['mediawiki.util'], function () {
if (document.getElementById('lumenward-header-links')) return;
var container =
document.querySelector('.vector-header-start') ||
document.querySelector('.mw-header');
if (!container) return;
var wrap = document.createElement('div');
wrap.id = 'lumenward-header-links';
wrap.style.display = 'inline-flex';
wrap.style.gap = '14px';
wrap.style.marginLeft = '16px';
wrap.style.alignItems = 'center';
var links = [
{ text: 'GitHub', url: 'https://github.com/Lumenward' },
{ text: 'Discord', url: 'https://discord.gg/Kc9DtJUG' },
];
links.forEach(function (l) {
var a = document.createElement('a');
a.href = l.url;
a.textContent = l.text;
a.target = '_blank';
a.rel = 'noopener';
a.style.fontWeight = '600';
a.style.textDecoration = 'none';
a.style.color = '#000';
wrap.appendChild(a);
});
container.appendChild(wrap);
});