From 1e42a8401e40934f536a5c42bf1df738639c30a3 Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Sat, 25 Apr 2026 13:01:47 +0200 Subject: [PATCH] always hide header bar on scroll down --- copyparty/web/browser.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 70be7ad0..501e5d89 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -7420,6 +7420,7 @@ function onwrapscroll () { lastY = newY; } +window.addEventListener('scroll', onwrapscroll); function onwidgetresize(){ var widget = ebi('widget'); @@ -7432,15 +7433,6 @@ function onwidgetresize(){ clmod(ebi('pathBar'), 'thin', thin); clmod(ebi('wrap'), 'thin', thin); - if(thin && !ows_active){ - window.addEventListener('scroll', onwrapscroll); - ows_active = true; - } - else if (!thin && ows_active){ - window.removeEventListener('scroll', onwrapscroll); - ows_active = false; - } - thin = thin || IE; var gtc = 'max-content max-content max-content ' + (thin ? '' : '20%') + ' auto max-content max-content max-content';