Guest User

Untitled

a guest
Jul 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. const dislike = (el) => {
  2. return new Promise((res, rej) => {
  3. el.click();
  4. setTimeout(() => {
  5. document.querySelector('a.itemAnchor').click();
  6. setTimeout(() => {
  7. res();
  8. }, 1000);
  9. }, 2000);
  10. });
  11. }
  12.  
  13. async function run (coll) {
  14. for (let el of coll) {
  15. await dislike(el);
  16. };
  17. }
  18.  
  19. const coll = document.getElementsByClassName('PageLikeButton');
  20. run(coll);
Add Comment
Please, Sign In to add comment