mirror of
https://github.com/NohamR/BetterYGG.git
synced 2026-01-11 17:08:17 +00:00
Improve UI and functionality for options and scripts
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user