Skip to content

Instantly share code, notes, and snippets.

@larskarbo
Created November 14, 2018 09:10
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 larskarbo/c09d0d445c246341d63f832afd140f09 to your computer and use it in GitHub Desktop.
Save larskarbo/c09d0d445c246341d63f832afd140f09 to your computer and use it in GitHub Desktop.
const howDidI = document.getElementById('doInSession.3')
const input = document.querySelector('input[type="text"]')
let i = 0
const int = setInterval(() => {
if (document.querySelectorAll('.insessionCorrect').length > 0) {
return clearInterval(int)
}
input.click()
input.value = i
howDidI.click()
i++
}, 700)
/*
*/
const howDidI = document.querySelector('.doInSession')
const input = document.querySelector('input[type="text"]')
let i = 0
const int = setInterval(() => {
if (document.querySelectorAll('.insessionCorrect').length > 0) {
return clearInterval(int)
}
input.click()
let arr = [...Array(6).fill(1), ...i.toString(3).split('').map(a => parseInt(a) + 1)].slice(-6)
input.value = arr.join(',')
howDidI.click()
i++
}, 1200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment