ScruffyRules

Untitled

Jan 14th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         My Fancy New Userscript
  3. // @namespace    http://scruffyrules.com
  4. // @version      0.1
  5. // @description  enter something useful
  6. // @author       ScruffyRules
  7. // @match        https://www.facebook.com/pokes*
  8. // @grant        none
  9. // ==/UserScript==
  10.  
  11. var count = 0;
  12. var autoPoke = setInterval(function() {
  13.     count++;
  14.     var anchors = document.getElementsByTagName("a"), i;
  15.     for (i = 0; i < anchors.length; i = i + 1) {
  16.         if (anchors.item(i).textContent === "Poke Back") {
  17.             anchors.item(i).click();
  18.             count = 0;
  19.         }
  20.     }
  21.     if (count > 9) {
  22.         location.reload();
  23.     }
  24. }, 1000);
  25.  
  26. console.log("Auto Poke Enabled");
Advertisement
Add Comment
Please, Sign In to add comment