/* eslint-disable jquery/no-global-selector */ $( function () { var mobileCutoffWidth = 550, // Track if DOM has been set up for mobile fanciness yet monobookMobileElements = false, // Toggles and targets for popouts toggles = { '#sidebar-toggle': '#sidebar-mobilejs', '#p-personal-toggle': '#p-personal', '#ca-more a': '#p-cactions', '#ca-languages a': '#p-lang', '#ca-tools a': '#p-tb' }; // Close menus function closeMenus() { $( '.mobile-menu-active' ).removeClass( 'mobile-menu-active' ); $( '.menus-cover' ).removeClass( 'visible' ); } // Set up DOM for mobile fanciness // We don't automatically do this because MonoBook; most users will be on desktop function setupMonoBookMobile() { if ( !monobookMobileElements && $( window ).width() <= mobileCutoffWidth ) { // Duplicate nav $( '#column-one' ).append( $( '#sidebar' ).clone().find( '*' ).addBack().each( function () { if ( this.id ) { this.id = this.id + '-mobilejs'; } } ).end().end() ); // Thing to fade out the content while menus are active $( '#column-one' ).append( $( '