From 5701598edadb04c364816dcba5972d71bc4146fb Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 5 Dec 2024 13:16:40 +0100 Subject: Revert "Implement showing and hiding header depending on scroll (#7029)" (#7064) This reverts commit be9b6c7290dddcd8b8b6a8926bd101b7123528b3. https://github.com/FreshRSS/FreshRSS/pull/7029 --- p/scripts/main.js | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'p/scripts/main.js') diff --git a/p/scripts/main.js b/p/scripts/main.js index 4da89f228..f74e36553 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1954,23 +1954,6 @@ function init_confirm_action() { document.querySelectorAll('button.confirm').forEach(function (b) { b.disabled = false; }); } -function init_scroll_header() { - const header = document.querySelector('header.header'); - if (header) { - const headerHeight = parseInt(getComputedStyle(header).height); - header.previousScroll = 0; - window.addEventListener('scroll', function () { - const currentScroll = window.scrollY; - if (currentScroll > headerHeight && currentScroll > header.previousScroll) { - header.classList.add('hide'); - } else { - header.classList.remove('hide'); - } - header.previousScroll = currentScroll; - }); - } -} - function faviconNbUnread(n) { if (typeof n === 'undefined') { const t = document.querySelector('.category.all .title'); @@ -2057,7 +2040,6 @@ function init_main_afterDOM() { removeFirstLoadSpinner(); init_notifications(); init_confirm_action(); - init_scroll_header(); const stream = document.getElementById('stream'); if (stream) { init_load_more(stream); -- cgit v1.2.3