|
|
Line 8: |
Line 8: |
| }); | | }); |
| }); | | }); |
|
| |
|
| |
|
| |
| /*
| |
| mw.loader.using('jquery.makeCollapsible').then(function () {
| |
| // Turn sidebar sections into collapsible groups
| |
| $('#mw-panel .portal').each(function () {
| |
| var $portal = $(this);
| |
| if ($portal.find('ul').length) {
| |
| $portal.addClass('collapsible');
| |
| $portal.makeCollapsible({
| |
| collapsed: true // start collapsed
| |
| });
| |
| }
| |
| });
| |
| });
| |
| */
| |
|
| |
| /*
| |
|
| |
| mw.loader.using('jquery.makeCollapsible').done(function () {
| |
| // Target sidebar portlets (each "box" in the sidebar)
| |
| $('#p-navigation, #p-tb, #p-Book-2, #p-wiki-navigation, #p-coll-print_export').addClass('mw-collapsible mw-collapsed');
| |
|
| |
| // Auto-apply collapsible behavior
| |
| $('.mw-collapsible').makeCollapsible();
| |
| });
| |
| */
| |
|
| |
| /*
| |
| mw.loader.using('jquery.makeCollapsible', function () {
| |
| $('.portal').each(function () {
| |
| var $header = $(this).find('h3');
| |
|
| |
| // Add persistent text (only if not already present)
| |
| if (!$header.find('.persistent-text').length) {
| |
| $header.append('<span class="persistent-text"> [Info]</span>');
| |
| }
| |
| }).makeCollapsible({
| |
| toggle: true
| |
| });
| |
| });
| |
| */
| |
|
| |
|
| |
|
| |
| /*
| |
|
| |
| // Ensure CollapsibleVector features are enabled
| |
| mw.loader.using('jquery.makeCollapsible', function () {
| |
| $('.portal').makeCollapsible({
| |
| toggle: true
| |
| });
| |
| });
| |
| */
| |
Revision as of 14:24, 24 August 2025
/* Any JavaScript here will be loaded for all users on every page load. */
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll('.collapsible-header').forEach(header => {
header.addEventListener('click', () => {
header.parentElement.classList.toggle('active');
});
});
});