This commit is contained in:
2025-07-23 10:43:45 +09:00
parent 6cb5ea9b15
commit 2719b7d291
17 changed files with 414 additions and 359 deletions
@@ -208,7 +208,7 @@ function scrollByPercent(current , max) {
document.documentElement.clientHeight
);
const currentScroll = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
const currentScroll = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0;
const moveAmount = pageHeight / max;
window.scrollTo({ top: moveAmount * current, behavior: "smooth" });
}
@@ -222,7 +222,7 @@ function scrollByPercentUpDown(isToDown , max) {
document.body.clientHeight,
document.documentElement.clientHeight
);
const currentScroll = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
const currentScroll = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0;
const moveAmount = Math.max(pageHeight / max,150);
window.scrollTo({ top: currentScroll + (moveAmount * isToDown) , behavior: "smooth" });
}