Compare commits

..

No commits in common. "e9271c3ef1f21b2b4f4a03717f8f62beccd067bf" and "a25ea40300125cba6a788217c53f623eca3bd7d6" have entirely different histories.

View file

@ -1,16 +1,12 @@
window.onload = (event) => { window.addEventListener("scroll", () => {
if ((document.documentElement.scrollHeight / window.screen.availHeight ) > 1.5) { var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
window.addEventListener("scroll", () => { var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
var winScroll = document.body.scrollTop || document.documentElement.scrollTop; var scrolled = (winScroll / height) * 100;
var height = document.documentElement.scrollHeight - document.documentElement.clientHeight; document.getElementById('progress').style.width = scrolled + "%";
var scrolled = (winScroll / height) * 100;
document.getElementById('progress').style.width = scrolled + "%";
const toTop = document.getElementById('totop'); const toTop = document.getElementById('totop');
if ((window.scrollY > 0 && !toTop.classList.contains("show")) || (window.scrollY <= 0 && toTop.classList.contains("show"))) { if ((window.scrollY > 0 && !toTop.classList.contains("show")) || (window.scrollY <= 0 && toTop.classList.contains("show"))) {
toTop.classList.toggle("show"); toTop.classList.toggle("show");
}
});
} }
} });