Skip to content

Instantly share code, notes, and snippets.

@tomyfalgui
Created May 29, 2022 10:29
Show Gist options
  • Save tomyfalgui/2d6a0d302d140175b5df938c872903b6 to your computer and use it in GitHub Desktop.
Save tomyfalgui/2d6a0d302d140175b5df938c872903b6 to your computer and use it in GitHub Desktop.
Lololol
function randomIntFromInterval(min, max) { // min and max included
return Math.floor(Math.random() * (max - min + 1) + min)
}
function shiz(start,end) {
const yo = []
for(let i = start; i < end + 1; i++) { yo.push(i)} return yo;}
const array = [...shiz(153, 158), ...shiz(161,173), ...shiz(175, 181), ...shiz(183,187), ...shiz(189,192)]
for(let i of array) {
const rand = randomIntFromInterval(3,5) // para di ganon ka baba
const query = document.querySelector(`input[name="Q${i}"][value="${rand}"]`)
console.log(query)
query.click()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment