Skip to content

Instantly share code, notes, and snippets.

@ozydingo
Created February 2, 2019 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozydingo/6d268ea7538c869f0c636ee1c069ce4d to your computer and use it in GitHub Desktop.
Save ozydingo/6d268ea7538c869f0c636ee1c069ce4d to your computer and use it in GitHub Desktop.
a/z key scrolling to scroll-disabled web content
function KeyPress(e) {
var evtobj = window.event? event : e
if (evtobj.keyCode == 90) {
window.scrollBy(0, 100)
}
if (evtobj.keyCode == 65) {
window.scrollBy(0, -100)
}
}
document.onkeydown = KeyPress;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment