Add scroll to buttons

This commit is contained in:
Dominic Ferrando
2025-04-23 22:15:44 -04:00
parent f04db77087
commit a08a9a69d2
2 changed files with 18 additions and 8 deletions
+7 -2
View File
@@ -13,8 +13,13 @@ function isOffScreen(el) {
);
}
function scrollToBottom() {
window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' });
function smoothScrollTo(loc) {
if (loc === "top") {
window.scrollTo({ top: 0, behavior: 'smooth' });
}
else if (loc === "bottom") {
window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' });
}
}
function isHttpWarningStatus(code) {