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: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 17: Line 17:
         if (header) {
         if (header) {
           var section = header.closest('.citizen-section-heading');
           var section = header.closest('.citizen-section-heading');
           if (section && !section.classList.contains('citizen-section-collapsed')) {
          var content = section?.nextElementSibling;
            // Only click if not collapsed
           if (section && content) {
             section.click();
            section.classList.add('citizen-section-collapsed'); // manually collapse
             content.style.display = "none"; // manually hide content
           }
           }
         }
         }