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 10: Line 10:
         + '</svg>';
         + '</svg>';


     var headerEnd = document.querySelector('.citizen-header__end');
     var headerEnd = document.querySelector('.citizen-drawer__card');
     if (headerEnd) {
     if (headerEnd) {
         headerEnd.append(btn);
         headerEnd.append(btn);
     }
     }
}());
}());

Revision as of 13:25, 19 March 2026

/* All JavaScript here will be loaded for users of the Citizen skin */
(function () {
    var btn = document.createElement('a');
    btn.href = '/index.php?title=Weapons';
    btn.title = 'Weapons';
    btn.className = 'citizen-header__button';

    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>';

    var headerEnd = document.querySelector('.citizen-drawer__card');
    if (headerEnd) {
        headerEnd.append(btn);
    }
}());