Skip to content

Instantly share code, notes, and snippets.

@Poolitzer
Last active February 17, 2024 16:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Poolitzer/bbae73729449152ddf15413194ad752a to your computer and use it in GitHub Desktop.
Save Poolitzer/bbae73729449152ddf15413194ad752a to your computer and use it in GitHub Desktop.
A half-an-hour excuse not to learn javascript code to auto craft new elements at https://neal.fun/infinite-craft/
const pairs = []
async function cheating() {
let elements = document.getElementsByClassName("mobile-items")[0]
let amount = elements.children.length
for (let sender = 0; sender < amount; sender++){
for (let receiver = 0; receiver < amount; receiver++){
if (pairs.includes(sender.toString() + receiver.toString()) || pairs.includes(receiver.toString() + sender.toString())){
continue;
}
elements.children[sender].children[0].click()
elements.children[receiver].children[0].click()
pairs.push(sender.toString() + receiver.toString())
await new Promise(r => setTimeout(r, 500));
}
}
cheating()
}
cheating()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment