More actions
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
if (window.innerWidth >= 768) { // Only on desktop | if (window.innerWidth >= 768) { // Only on desktop | ||
const idsToCollapse = ['Muling', 'Misc', 'Anti-ban', 'Anti-PK' 'Trip Settings', 'Skills Settings', 'Equipment']; // section IDs | const idsToCollapse = ['Muling', 'Misc', 'Anti-ban', 'Anti-PK', 'Trip Settings', 'Skills Settings', 'Equipment']; // section IDs | ||
idsToCollapse.forEach(function(id) { | idsToCollapse.forEach(function(id) { |
Revision as of 14:00, 25 April 2025
/* All JavaScript here will be loaded for users of the Citizen skin */ // Force sections with certain IDs to be collapsed by default on desktop $(document).ready(function() { if (window.innerWidth >= 768) { // Only on desktop const idsToCollapse = ['Muling', 'Misc', 'Anti-ban', 'Anti-PK', 'Trip Settings', 'Skills Settings', 'Equipment']; // section IDs idsToCollapse.forEach(function(id) { var header = document.getElementById(id); if (header) { var section = header.closest('.citizen-section-heading'); if (section) { section.classList.add('citizen-collapsed'); $(section.nextElementSibling).hide(); // hide the content div } } }); } });