From e0604033db14e408b891569289950bb986d5b191 Mon Sep 17 00:00:00 2001 From: AkisYTB3 Date: Thu, 25 Jan 2024 15:57:36 +0100 Subject: [PATCH] faster fading --- scripts/pages/user/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pages/user/main.js b/scripts/pages/user/main.js index 9ae3f40..c261b03 100644 --- a/scripts/pages/user/main.js +++ b/scripts/pages/user/main.js @@ -7,7 +7,7 @@ document.addEventListener('DOMContentLoaded', function () { function handleScroll() { // Calculate the opacity based on the scroll position var scrollFraction = window.scrollY / (document.documentElement.scrollHeight - window.innerHeight); - var opacity = 1 - scrollFraction; + var opacity = 1 - (scrollFraction*2); // Apply the opacity to the elements h1.style.opacity = opacity;