Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[...document.querySelectorAll('button.invitation-card__action-btn')].forEach(b => {
if (b.innerText === 'Accept') {
b.click()
}
})
const nodes = [...document.querySelectorAll('button.invitation-card__action-btn')];
const sleep = (ms) => new Promise(res => setTimeout(res, ms))
for (const node of nodes) {
await sleep(1000)
if (node.innerText === 'Accept') {
node.click()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment