| 1 | const BODY_NOTIFICATIONS_REVEAL_CLASS = 'navigation-enabled secondary-navigation-enabled'; |
| 2 | |
| 3 | /** |
| 4 | * Wire up the main menu |
| 5 | * |
| 6 | * @ignore |
| 7 | */ |
| 8 | function init() { |
| 9 | |
| 10 | // See I09c27a084100b223662f84de6cbe01bebe1fe774 |
| 11 | // will trigger every time the Echo notification is opened or closed. |
| 12 | // This controls the drawer like behaviour of notifications |
| 13 | // on tablet in mobile mode. |
| 14 | mw.hook( 'echo.mobile' ).add( ( isOpen ) => { |
| 15 | $( document.body ).toggleClass( BODY_NOTIFICATIONS_REVEAL_CLASS, isOpen ); |
| 16 | } ); |
| 17 | } |
| 18 | |
| 19 | module.exports = { |
| 20 | init |
| 21 | }; |