Last active
March 15, 2019 23:20
-
-
Save jamezrin/665030398aaea5e89b5da2840fc7a04e to your computer and use it in GitHub Desktop.
Control de preguntas en tests mediante las flechas de dirección
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
// ==UserScript== | |
// @name eTestWeb / Controles por Teclado | |
// @namespace https://jamezrin.name | |
// @version 0.2 | |
// @description Control de preguntas en tests mediante las flechas de dirección | |
// @author jaime@jamezrin.name | |
// @match *://www.carnetcnae.com/* | |
// @grant all | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var btnAnterior = document.getElementById('ctl00_cphContenedor_btnAnterior'), | |
btnSiguiente = document.getElementById('ctl00_cphContenedor_btnSiguiente'); | |
document.addEventListener("keydown", function(e) { | |
if (btnAnterior && e.keyCode === 37) { | |
btnAnterior.click(); | |
} else if (btnSiguiente && e.keyCode === 39) { | |
btnSiguiente.click(); | |
} | |
}, false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment