scroll up button, visible class

This commit is contained in:
ReznoRMichael 2021-02-16 18:55:33 +01:00
parent 3acf94933e
commit 578824f00a
2 changed files with 11 additions and 6 deletions

View file

@ -409,6 +409,10 @@ a.button:visited {
display: none;
}
.visible-block {
display: block;
}
.spoiler-text {
display: inline;
/* These are technically the same, but use both */

View file

@ -17,11 +17,12 @@ function DetectPageScroll() {
/* Maximum number of pixels that can be scrolled by the user */
let scrollTotal = ROOT.scrollHeight - ROOT.clientHeight;
let scrollUpButton = document.querySelector(".scroll-up-button");
if ((ROOT.scrollTop / scrollTotal) > 0.80) {
//show button
/* Show button */
} else {
//hide button
/* Hide button */
}
}