Guest User

Untitled

a guest
Nov 17th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. // Setting up everything we need to attack the pokers ;-)
  2. var listOfPokers = document.querySelectorAll('a[ajaxify^="/ajax/pokes/poke_inline.php?uid="]')
  3. , poke = document.createEvent('MouseEvents')
  4. , mouseOverPoker = document.createEvent('MouseEvents')
  5. , pokeDialog = document.querySelector('.fbRemindersStory img[alt=Pokes]');
  6.  
  7. // Setting up the poke itself
  8. poke.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  9.  
  10. // Fooling FB into thinking that it's actually done by a human and not a bot
  11. mouseOverPoker.initMouseEvent('mouseover', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  12.  
  13. // The bot opens the list of pokers dialog
  14. pokeDialog.dispatchEvent(poke);
  15.  
  16. // Missiles away...poke-em-all!!!!111
  17. Array.prototype.forEach.call(listOfPokers, function(poker) {
  18. poker.dispatchEvent(mouseOverPoker);
  19. setTimeout(function() {
  20. poker.dispatchEvent(poke);
  21. }, 1000);
  22. });
  23.  
  24. // The bot closes the list of pokers dialog
  25. pokeDialog.dispatchEvent(poke);
Add Comment
Please, Sign In to add comment