Last active
November 12, 2022 02:28
-
-
Save magasine/759e08560189444f3926ce9718ed35e5 to your computer and use it in GitHub Desktop.
! Scroll Top or Bottom - Toggle (bookmarklet)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: void (function () { | |
if ((window.innerHeight + window.scrollY) >= document.body.scrollHeight) { | |
window.scroll(0, 0); | |
} else { | |
window.scrollTo(0, document.body.scrollHeight); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment