Remove unused CSS class sidebar-hidden

This commit is contained in:
Guillaume Gomez 2025-06-05 15:41:12 +02:00 committed by Eric Huss
parent e6315bf2b1
commit f942f3835e

View file

@ -524,7 +524,6 @@ aria-label="Show hidden lines"></button>';
let firstContact = null;
function showSidebar() {
body.classList.remove('sidebar-hidden');
body.classList.add('sidebar-visible');
Array.from(sidebarLinks).forEach(function(link) {
link.setAttribute('tabIndex', 0);
@ -540,7 +539,6 @@ aria-label="Show hidden lines"></button>';
function hideSidebar() {
body.classList.remove('sidebar-visible');
body.classList.add('sidebar-hidden');
Array.from(sidebarLinks).forEach(function(link) {
link.setAttribute('tabIndex', -1);
});
@ -765,7 +763,7 @@ aria-label="Show hidden lines"></button>';
let scrollTop = document.scrollingElement.scrollTop;
let prevScrollTop = scrollTop;
const minMenuY = -menu.clientHeight - 50;
// When the script loads, the page can be at any scroll (e.g. if you reforesh it).
// When the script loads, the page can be at any scroll (e.g. if you refresh it).
menu.style.top = scrollTop + 'px';
// Same as parseInt(menu.style.top.slice(0, -2), but faster
let topCache = menu.style.top.slice(0, -2);