Shakedos

Facebook select all friends

Jun 18th, 2011
1,212
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**Code start
  2.  *Change z=10 if you have less\more friends then 500
  3.  *@param (int) "fu" - from what user to start
  4.  *@param (int) "tu" - what user to end
  5.  *Example: var z=10,fu=10,tu=3000
  6.  *(will select only 2990 users, starting from user number 11)
  7.  *
  8.  *You may use the script without "fu" and "tu"
  9.  *so it will run all over your users from 1 to LAST.
  10.  */
  11. javascript: var z = 10,
  12.     fu=10,
  13.     tu=3000,
  14.     w = window,
  15.     d = "document",
  16.     wd = w[d];
  17.  
  18. function l() {
  19.     p = wd.getElementsByName("checkableitems[]");
  20.     var le=("undefined"!=typeof tu)?tu:p.length;
  21.     var st=("undefined"!=typeof fu)?fu:0;
  22.     for(count=st;count<le;count++) setTimeout("p[" + count + "].click()", 10);
  23.     alert("All of your friends selected, you may send your spam now")
  24. }
  25. var fbProfileBrowserListContainer = wd.getElementsByClassName("fbProfileBrowserListContainer"),
  26.     f = wd.getElementById(fbProfileBrowserListContainer[1].parentNode.getAttribute("id"));
  27.  
  28. function b(a) {
  29.     f.scrollTop += 1E7;
  30.     a >= z ? setTimeout("l()", 1E3) : setTimeout("b(" + (a + 1) + ")", 2E3)
  31. }
  32. setTimeout("b(1)", 2E3);
  33. void(0);
  34.  
  35. //Code end
RAW Paste Data