Skip to content
document.addEventListener('DOMContentLoaded', function() {
const toggle = document.getElementById('columnToggle');
const columns = document.querySelectorAll('[data-hide-column="true"]');
if (toggle && columns.length > 0) {
// Load saved preference
const isHidden = localStorage.getItem('columnHidden') === 'true';
toggle.checked = isHidden;
updateColumnVisibility(isHidden);
// Add toggle event
toggle.addEventListener('change', function() {
const shouldHide = this.checked;
localStorage.setItem('columnHidden', shouldHide);
updateColumnVisibility(shouldHide);
});
function updateColumnVisibility(hide) {
columns.forEach(column => {
column.style.display = hide ? 'none' : '';
column.style.opacity = hide ? '0' : '1';
column.style.transition = 'opacity 0.3s ease';
});
// Update label text
const label = document.querySelector('.toggle-label');
if (label) {
label.textContent = hide ? 'Show Sidebar' : 'Hide Sidebar';
}
}
}
});