MediaWiki:Common.js: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
Line 118:
 
mw.hook( 'wikipage.collapsibleContent' ).add( mwCollapsibleSetup );
 
/**
* Expand MobileFrontend sections by default
*/
mw.hook( 'mobileFrontEnd.section.initialized' ).add( function () {
// 500ms gives the mobile skin enough time to attach its own listeners
setTimeout(function () {
$( '.section-heading' ).each( function () {
var $heading = $( this );
// If it's not already open, trigger the click
if ( !$heading.hasClass( 'open-block' ) && !$heading.hasClass( 'is-expanded' ) ) {
$heading.trigger( 'click' );
}
} );
}, 500);
} );
 
/* End of mw.loader.using callback */