Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. async function getAllUsers() {
  2. const delay = duration => new Promise(resolve => setTimeout(resolve, duration))
  3. const items = Array.from(document.querySelector('.friends-container').querySelectorAll('li'))
  4. let emails = []
  5. for (let el of items) {
  6. if (el && el.querySelector('.edit-btn')) {
  7. el.querySelector('.edit-btn').click()
  8.  
  9. await delay(1000)
  10.  
  11. const email = document.querySelector('.modal-dialog .text-muted').innerText
  12.  
  13. document.querySelector('.modal-dialog .close').click()
  14.  
  15. emails.push(email)
  16. }
  17. }
  18.  
  19. return emails
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement