Created
October 6, 2020 06:28
-
-
Save 0x4007/93a67111b8aad72245eb7a337ca2ee55 to your computer and use it in GitHub Desktop.
automate clicking 0 amount approval after doing one manually on https://tac.dappstar.io/
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
const buffer = []; | |
function queue(e) { | |
buffer.push(e); | |
} | |
document.querySelectorAll( | |
`#root > | |
div > | |
div > | |
table > | |
tbody > | |
tr > | |
td > | |
span > | |
button` | |
).forEach(queue); | |
function timers(e, i) { | |
setTimeout(function () { | |
e.click(); | |
requestAnimationFrame(function () { | |
document.querySelector(`body > | |
div.ui.page.modals.dimmer.transition.visible.active > | |
div > | |
div.content > | |
form > | |
div.ui.two.column.grid > | |
div > | |
div:nth-child(2) > | |
div > | |
button`).click(); | |
}); | |
}, i * 250); | |
}; | |
buffer.forEach(timers) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment