Skip to content

Instantly share code, notes, and snippets.

@AndersDJohnson
Created February 13, 2021 15:18
Show Gist options
  • Save AndersDJohnson/8cddd138d8b413cc5c15db6707b5b6e3 to your computer and use it in GitHub Desktop.
Save AndersDJohnson/8cddd138d8b413cc5c15db6707b5b6e3 to your computer and use it in GitHub Desktop.
{
const $ = document.querySelector.bind(document)
do {
$('.remove-ad').click()
await new Promise(r => setTimeout(r, 1000))
$('.btn--wide').click()
await new Promise(r => setTimeout(r, 3000))
next = $('.remove-ad')
} while (next)
}
@AndersDJohnson
Copy link
Author

Self-code review: Could make this cleaner someday if web gets the new Node.js v16 Timers Promises API! 🙏 😍 await setTimeout(1000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment