Improve UI and functionality for options and scripts

This commit is contained in:
√(noham)²
2025-12-23 22:56:12 +01:00
parent 98c7f2fcd5
commit 917e536468
9 changed files with 183 additions and 84 deletions

View File

@@ -1,9 +1,13 @@
hideSidebar();
$(window).on('resize', function () {
window.addEventListener('resize', function () {
hideSidebar();
});
function hideSidebar() {
$(window).width() < 1750 ? $('#cat, .back-cat').removeClass('active') : $('#cat, .back-cat').addClass('active');
if (window.innerWidth < 1750) {
document.querySelectorAll('#cat, .back-cat').forEach(el => el.classList.remove('active'));
} else {
document.querySelectorAll('#cat, .back-cat').forEach(el => el.classList.add('active'));
}
}