added source to the algorithm used

This commit is contained in:
Kim, Jimin 2021-12-15 11:52:58 +09:00
parent 2a4c5e99aa
commit f1df3c57bc

View file

@ -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
)