mediawiki-skins-MinervaNeue/resources/skins.minerva.scripts/menu.js
Ed Sanders 2be7b9f919 build: Update jsdoc-wmf-theme to 1.1.0
Additional changes:
* Update Minerva so that it doesn't output any APIs
to the documentation - this is intentional as Minerva does
not have any public facing APIs.

Bug: T368081
Change-Id: Ie1a3ea30cbf35663c7fdd2494c1698044882969e
2024-06-28 12:38:54 -07:00

21 lines
528 B
JavaScript

const BODY_NOTIFICATIONS_REVEAL_CLASS = 'navigation-enabled secondary-navigation-enabled';
/**
* Wire up the main menu
* @ignore
*/
function init() {
// See I09c27a084100b223662f84de6cbe01bebe1fe774
// will trigger every time the Echo notification is opened or closed.
// This controls the drawer like behaviour of notifications
// on tablet in mobile mode.
mw.hook( 'echo.mobile' ).add( ( isOpen ) => {
$( document.body ).toggleClass( BODY_NOTIFICATIONS_REVEAL_CLASS, isOpen );
} );
}
module.exports = {
init
};