Skip to content

Instantly share code, notes, and snippets.

@texora
Created June 6, 2021 17:39
Show Gist options
  • Save texora/f38f7f576e9fdc4a3aedb3c74f976b6a to your computer and use it in GitHub Desktop.
Save texora/f38f7f576e9fdc4a3aedb3c74f976b6a to your computer and use it in GitHub Desktop.
const selectAllButton = document.querySelector('#selectAll')
const removeButton = document.querySelector('.moveElement-btn-trash')
const click = (element, duration) => {
return new Promise((resolve) =>
setTimeout(() => {
element.click()
resolve('success')
}, duration * 1000)
)
}
const main = async () => {
while (document.querySelector('.starButton-star')) {
await click(selectAllButton, 5)
await click(removeButton, 2)
}
}
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment