Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Citizen.js

MediaWiki interface page
Revision as of 14:15, 25 April 2025 by Acans (talk | contribs)

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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
$(document).ready(function() {
  if (window.innerWidth >= 768) { // Only on desktop
    const idsToCollapse = [
      'Muling',
      'Misc',
      'Anti-ban',
      'Anti-PK',
      'Trip_Settings',
      'Skills_Settings',
      'Equipment'
    ];

    idsToCollapse.forEach(function(rawId) {
      var id = rawId.replace(/ /g, "_");
      var header = document.getElementById(id);
      if (header) {
        var section = header.closest('.citizen-section-heading');
        if (section && !section.classList.contains('citizen-section-collapsed')) {
          // Only click if the section is NOT already collapsed
          section.click();
        }
      }
    });
  }
});