Skip to content

Instantly share code, notes, and snippets.

@0x4007
Created October 6, 2020 06:28
Show Gist options
  • Save 0x4007/93a67111b8aad72245eb7a337ca2ee55 to your computer and use it in GitHub Desktop.
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/
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