mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-21 01:52:49 +00:00
c43cdce48c
Change-Id: I33feb8bccbd870f589a01dc187e6155b7498714c
20 lines
529 B
JavaScript
20 lines
529 B
JavaScript
const BODY_NOTIFICATIONS_REVEAL_CLASS = 'navigation-enabled secondary-navigation-enabled';
|
|
|
|
/**
|
|
* Wire up the main menu
|
|
*/
|
|
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( function ( isOpen ) {
|
|
$( document.body ).toggleClass( BODY_NOTIFICATIONS_REVEAL_CLASS, isOpen );
|
|
} );
|
|
}
|
|
|
|
module.exports = {
|
|
init: init
|
|
};
|