MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
*/ | */ | ||
/* | |||
mw.loader.using('jquery.makeCollapsible', function () { | mw.loader.using('jquery.makeCollapsible', function () { | ||
$('.portal').each(function () { | $('.portal').each(function () { | ||
Line 23: | Line 24: | ||
}); | }); | ||
}); | }); | ||
*/ | |||
Revision as of 17:33, 21 August 2025
/* Any JavaScript here will be loaded for all users on every page load. */ /* 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 }); }); */