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

MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
No edit summary
Blanked the page
Tag: Blanking
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
document.addEventListener('DOMContentLoaded', function () {
    const btn = document.querySelector('.citizen-search-toggle');


    // If the search button exists, create a hotkey to open it
    if (btn) {
        document.addEventListener('keydown', function (e) {
            // Change this to any combo you want
            if (e.altKey && e.shiftKey && e.key.toLowerCase() === 'f') {
                e.preventDefault();
                btn.click(); // Opens the Citizen search overlay
            }
        });
    }
});

Latest revision as of 15:32, 8 November 2025