added source to the algorithm used
This commit is contained in:
parent
2a4c5e99aa
commit
f1df3c57bc
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue