diff --git a/src/css/style.css b/src/css/style.css index 780a941..170bc12 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -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 */ diff --git a/src/js/page-functions.js b/src/js/page-functions.js index 60fc997..a64fad4 100644 --- a/src/js/page-functions.js +++ b/src/js/page-functions.js @@ -10,19 +10,20 @@ function ShowElement() { } function HideElement() { - + } 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 - } else { - //hide button - } + if ((ROOT.scrollTop / scrollTotal) > 0.80) { + /* Show button */ + } else { + /* Hide button */ + } } document.addEventListener("scroll", DetectPageScroll); \ No newline at end of file