Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Citizen.js: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 3: Line 3:
     btn.href = '/index.php?title=Weapons';
     btn.href = '/index.php?title=Weapons';
     btn.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.className = '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"/>'

Revision as of 13:29, 19 March 2026

(function () {
    var btn = document.createElement('a');
    btn.href = '/index.php?title=Weapons';
    btn.title = 'Weapons';
    btn.className = '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);
    }
}());