aboutsummaryrefslogtreecommitdiff
path: root/p/scripts/main.js
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-12-05 13:16:40 +0100
committerGravatar GitHub <noreply@github.com> 2024-12-05 13:16:40 +0100
commit5701598edadb04c364816dcba5972d71bc4146fb (patch)
tree7b235b4ab47f873e2e253d9329756a53ffb2a7be /p/scripts/main.js
parent72b11aac65bde7aa22423a4401cbc31dacf3dab1 (diff)
Revert "Implement showing and hiding header depending on scroll (#7029)" (#7064)
This reverts commit be9b6c7290dddcd8b8b6a8926bd101b7123528b3. https://github.com/FreshRSS/FreshRSS/pull/7029
Diffstat (limited to 'p/scripts/main.js')
-rw-r--r--p/scripts/main.js18
1 files changed, 0 insertions, 18 deletions
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);