SHARE
TWEET

Untitled

a guest Jul 20th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top