MediaWiki:Mobile.js: Difference between revisions
Appearance
Created page with "→All JavaScript here will be loaded for users of the mobile site: mw.hook( 'wikipage.content' ).add( function ( $content ) { // Click any collapsed section headings or remove collapsed classes $content.find( '.collapsible-heading:not(.open-block)' ).each( function () { $( this ).trigger( 'click' ); } ); } );" |
No edit summary |
||
| Line 1: | Line 1: | ||
/* All JavaScript here will be loaded for users of the mobile site */ | /* All JavaScript here will be loaded for users of the mobile site */ | ||
mw.hook( 'wikipage.content' ).add( function ( $content ) { | mw.hook( 'wikipage.content' ).add( function ( $content ) { | ||
// | // Trigger Minerva's own toggle handler on any closed heading | ||
$content.find( '.collapsible-heading:not(.open-block)' ). | $content.find( '.collapsible-heading:not(.open-block)' ).trigger( 'click' ); | ||
// Fallback: force hidden section bodies visible | |||
$content.find( '.mf-collapsible-content, .collapsible-block' ).show(); | |||
} ); | } ); | ||
Revision as of 06:47, 22 November 2026
/* All JavaScript here will be loaded for users of the mobile site */
mw.hook( 'wikipage.content' ).add( function ( $content ) {
// Trigger Minerva's own toggle handler on any closed heading
$content.find( '.collapsible-heading:not(.open-block)' ).trigger( 'click' );
// Fallback: force hidden section bodies visible
$content.find( '.mf-collapsible-content, .collapsible-block' ).show();
} );