MediaWiki:Common.js: Difference between revisions

Enable collapsible elements on mobile view, in line with desktop view behaviour
No edit summary
(Enable collapsible elements on mobile view, in line with desktop view behaviour)
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 671: Line 671:
});
});
}
}
}
function initCollapsibleElements() {
/* 2024-02-18 Allow collapsing of elements with class 'mw-collapsible', in line
* with desktop view behaviour. Extension:MobileFrontend disables this, but
* it is still desirable for our use case
*/
mw.loader.using('jquery.makeCollapsible').then(function () { $('.mw-collapsible').makeCollapsible(); });
}
}


Line 787: Line 795:
// Table sticky headers
// Table sticky headers
initStickyHeaders();
initStickyHeaders();
// Collapsible elements (for Extension:MobileFrontend)
initCollapsibleElements();
// Wiki app native navigation
// Wiki app native navigation
initWikiAppSidebar();
initWikiAppSidebar();