MediaWiki:Common.js: Difference between revisions
Appearance
No edit summary Tag: Manual revert |
No edit summary |
||
| (8 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
/* ========================================================= | /* ========================================================= | ||
Lumenward: Top | Lumenward: Top header links (Vector 2022, SAFE) | ||
Places GitHub + Discord next to the logo (left lane) | |||
========================================================= */ | ========================================================= */ | ||
mw.loader.using(['mediawiki.util'], function () { | 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' }, | |||
]; | |||
function | links.forEach(function (l) { | ||
var a = document.createElement('a'); | var a = document.createElement('a'); | ||
a. | a.href = l.url; | ||
a.textContent = l.text; | |||
a.textContent = | |||
a.target = '_blank'; | a.target = '_blank'; | ||
a.rel = 'noopener'; | a.rel = 'noopener'; | ||
a.style.fontWeight = '600'; | a.style.fontWeight = '600'; | ||
a.style.textDecoration = 'none'; | a.style.textDecoration = 'none'; | ||
a.style. | a.style.color = '#000'; | ||
wrap.appendChild(a); | |||
} | }); | ||
container.appendChild(wrap); | |||
}); | }); | ||
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);
});