Last active
November 12, 2022 02:27
-
-
Save magasine/6e6b122b3a0a003152bedc7668f14e9b to your computer and use it in GitHub Desktop.
! Scroll Left or Right - 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.innerWidth + window.scrollX) >= document.body.scrollWidth) { | |
window.scroll(0, 0); | |
} else { | |
window.scrollTo(document.documentElement.scrollWidth, 0); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment