Created
May 19, 2019 10:11
-
-
Save andrejIka/156015f6b53b691c984d05a9b4b7bac0 to your computer and use it in GitHub Desktop.
js
This file contains hidden or 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
// Here You can type your custom JavaScript... | |
document.onkeydown = function(evt) { | |
evt = evt || window.event; | |
console.log(evt.keyCode); | |
if (evt.keyCode == 78) { | |
//alert("Escape"); | |
document.querySelector('a.pg:last-child').dispatchEvent(new MouseEvent('click')); | |
} | |
if (evt.keyCode == 80) { | |
//alert("Escape"); | |
document.querySelector('.pre-btn a').dispatchEvent(new MouseEvent('click')); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment