Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andrejIka/156015f6b53b691c984d05a9b4b7bac0 to your computer and use it in GitHub Desktop.
Save andrejIka/156015f6b53b691c984d05a9b4b7bac0 to your computer and use it in GitHub Desktop.
js
// 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