From f1df3c57bc91c627f1e4e5547af62b653ca4c2f9 Mon Sep 17 00:00:00 2001 From: developomp Date: Wed, 15 Dec 2021 11:52:58 +0900 Subject: [PATCH] added source to the algorithm used --- source/src/components/Navbar.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/source/src/components/Navbar.tsx b/source/src/components/Navbar.tsx index e88c995..6e764c0 100644 --- a/source/src/components/Navbar.tsx +++ b/source/src/components/Navbar.tsx @@ -86,6 +86,7 @@ const ReadProgress = () => { const h = document.documentElement const b = document.body + // https://stackoverflow.com/a/8028584/12979111 setScroll( ((h[st] || b[st]) / ((h[sh] || b[sh]) - h.clientHeight)) * 100 )