We are actively looking for staff to help us build the wiki. If you are interested please join our Discord server and apply.
MediaWiki:Common.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
$(document).ready(function() {
// Function to toggle the collapse
function toggleSidebarCategory(category) {
$('#' + category + ' > .body').slideToggle();
$('#' + category + ' > .head').toggleClass('collapsed');
}
// Add toggle link to each category header
$('#mw-panel .portal > h3').each(function() {
var category = $(this).parent().attr('id');
$(this).addClass('head').click(function() { toggleSidebarCategory(category); });
});
// Hide all categories by default
$('#mw-panel .portal > .body').hide();
$('#mw-panel .portal > h3').addClass('collapsed');
});