MediaWiki:Citizen.js: Difference between revisions
MediaWiki interface page
More actions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
(function () { | (function () { | ||
var btn = document.createElement('a'); | var btn = document.createElement('a'); | ||
btn.href = '/index.php?title=Weapons'; | btn.href = '/index.php?title=Weapons'; | ||
btn.title = 'Weapons'; | btn.title = 'Weapons'; | ||
btn.className = 'citizen- | btn.className = 'citizen-header__item citizen-cdx-button--size-large cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet'; | ||
btn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="currentColor">' | btn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="currentColor">' | ||
+ '<path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2z"/>' | + '<path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2z"/>' | ||
+ '</svg>'; | + '</svg>' | ||
+ '<span>Weapons</span>'; | |||
var drawer = document.querySelector('.citizen-drawer'); | var drawer = document.querySelector('.citizen-drawer'); | ||
Revision as of 13:28, 19 March 2026
(function () {
var btn = document.createElement('a');
btn.href = '/index.php?title=Weapons';
btn.title = 'Weapons';
btn.className = 'citizen-header__item citizen-cdx-button--size-large cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet';
btn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="currentColor">'
+ '<path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2z"/>'
+ '</svg>'
+ '<span>Weapons</span>';
var drawer = document.querySelector('.citizen-drawer');
if (drawer) {
drawer.insertAdjacentElement('afterend', btn);
}
}());