MediaWiki:Common.js: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 123:
*/
mw.hook( 'mobileFrontEnd.section.initialized' ).add( function () {
// Add a small delay (e.g., 150ms) to ensure event listeners are ready
$( '.section-heading' ).each( function () {
setTimeout(function () {
var $heading = $( this );
$( '.section-heading' ).each( function () {
// Check if the section is currently closed (lacks the 'open-block' class)
var $heading = $( this );
if ( $heading.hasClass( 'open-block' ) === false ) {
// Check if the section is currently closed (lacks the 'open-block' class)
$heading.trigger( 'click' );
if ( $heading.hasClass( 'open-block' ) === false ) {
}
$heading.trigger( 'click' );
} );
}
} );
}, 150);
} );