Skip to content

Instantly share code, notes, and snippets.

@DWboutin
Last active May 5, 2020 16:14
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 DWboutin/468f18761867a83fea2f7bac424a8a0f to your computer and use it in GitHub Desktop.
Save DWboutin/468f18761867a83fea2f7bac424a8a0f to your computer and use it in GitHub Desktop.
Turnip.exchange automatic join queue
var int = setInterval(function() {
var yourName = "Polle"
var button = document.querySelector('#app > div.view.bg-background.bg-center.col-start-2 > div.grid.gap-2 > div > button')
if(button.disabled === false) {
clearInterval(int)
button.click()
window.focus()
setTimeout(function() {
var modalInput = document.querySelector('#app > div.view.bg-background.bg-center.rounded-md.p-5.grid.grid-cols-1.gap-2.relative.w-94.col-start-2 > div.absolute.bg-overlay-mask.inset-0.flex.justify-center.items-center.rounded-md.flex-col.pointer-events-auto.z-30 > div > input')
var modalButton = document.querySelector('#app > div.view.bg-background.bg-center.rounded-md.p-5.grid.grid-cols-1.gap-2.relative.self-center.justify-self-center.col-start-2 > div.absolute.bg-overlay-mask.inset-0.flex.justify-center.items-center.rounded-md.flex-col.pointer-events-auto.z-30 > div > div > button:nth-child(2)')
modalInput.value = yourName
modalInput.dispatchEvent(new KeyboardEvent('keyup', {'keyCode':32, 'which':32}));
setTimeout(function() {
modalButton.click()
}, 10)
}, 100)
}
}, 100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment