Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function getAllUsers() {
- const delay = duration => new Promise(resolve => setTimeout(resolve, duration))
- const items = Array.from(document.querySelector('.friends-container').querySelectorAll('li'))
- let emails = []
- for (let el of items) {
- if (el && el.querySelector('.edit-btn')) {
- el.querySelector('.edit-btn').click()
- await delay(1000)
- const email = document.querySelector('.modal-dialog .text-muted').innerText
- document.querySelector('.modal-dialog .close').click()
- emails.push(email)
- }
- }
- return emails
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement