Skip to content

Instantly share code, notes, and snippets.

@GitHub30
Created June 15, 2022 00:29
Show Gist options
  • Save GitHub30/604368ed50f52ef91f4640dc99876492 to your computer and use it in GitHub Desktop.
Save GitHub30/604368ed50f52ef91f4640dc99876492 to your computer and use it in GitHub Desktop.
document.body.addEventListener('keydown', e => {
const el = [...document.querySelectorAll('.QuestionTxt')].find(qt=>!qt.querySelector('li.on'))
if (e.key === 'ArrowLeft') {
el.querySelector('a img[alt="○"]').click()
el.querySelector('[alt="次の問題へ"]').click()
} else if (e.key === 'ArrowRight') {
el.querySelector('a img[alt="×"]').click()
el.querySelector('[alt="次の問題へ"]').click()
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment