Last active
May 5, 2020 16:14
-
-
Save DWboutin/468f18761867a83fea2f7bac424a8a0f to your computer and use it in GitHub Desktop.
Turnip.exchange automatic join queue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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