honaalqahera

اضافه جميع الاصدقاء للاعجاب بصفحهتك

Apr 29th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.65 KB | None | 0 0
  1. var ckeckbox_items = document.getElementsByName("checkableitems[]");
  2. var button_items = document.getElementsByClassName("uiButton _1sm");
  3. var invite_2_el = document.getElementsByClassName("uiScrollableAreaContent");
  4. if(invite_2_el[invite_2_el.length-1].children[0].children[1]){
  5. var classNameX = invite_2_el[invite_2_el.length-1].children[0].children[1].children[0].classList[0];
  6. var circle_items = invite_2_el[invite_2_el.length-1].getElementsByClassName(classNameX);
  7. }
  8. var lastChecked = 0;
  9. var scrollStay = 0;
  10. var scrollEl = document.querySelector(".fbProfileBrowserResult.scrollable.threeColumns") || document.querySelector("._1v3l .uiScrollableAreaWrap") || document.querySelector("._4ilb .uiScrollableAreaWrap");
  11. var oldScrollT = -1;
  12. var interval,mainDiv;
  13.  
  14. if(scrollEl){
  15. makeMsg(" جااري تحميل الاصدقاء","By mahmoud nour https://www.facebook.com/OFF.EG - <br> الحيتان - احمد سمير الله يرحمو -.",[
  16. {
  17. name:"Cancel",
  18. click:function(){
  19. clearInterval(interval);
  20. mainDiv.remove();
  21. }
  22. }
  23. ]);
  24. var interValTime= 600;
  25. if(button_items.length!=0){
  26. items = button_items;
  27. interValTime= 5000;
  28. //console.log("TYPE:BUTTONS");
  29. } else if(ckeckbox_items.length!=0){
  30. items = ckeckbox_items;
  31. interValTime= 600;
  32. //console.log("TYPE:CHECKBOXS");
  33. }else{
  34. items = circle_items;
  35. interValTime= 5000;
  36. //console.log("TYPE:C");
  37. }
  38. if(button_items) scrolling();
  39. interval = setInterval(scrolling,interValTime);
  40. }else{
  41. makeMsg("Warning","لقد نسيت شي ,اولا اضغط على دعوة الأصدقاء لهذه الصفحة.",[
  42. {
  43. name:"Close",
  44. click:function(){
  45. mainDiv.remove();
  46. }
  47. }
  48. ]);
  49. }
  50. function scrolling(){
  51. if(scrollStay==2){
  52. clearInterval(interval);
  53.  
  54. makeMsg("Done"," by mahmoud nour https://www.facebook.com/OFF.EG <br> الحيتان - احمد سمير الله يرحمو -, جااري تحميل الاصدقاء .<br>If you like it please share & rate it.",[
  55. {
  56. type:1,
  57. name:"Share",
  58. href:"https://www.facebook.com/sharer/sharer.php?u=https://www.facebook.com/OFF.EG"
  59.  
  60. },
  61. {
  62. type:1,
  63. name:"Rate",
  64. href:"https://www.facebook.com/OFF.EG"
  65.  
  66. },
  67. {
  68. name:"Close",
  69. click:function(){
  70. mainDiv.remove();
  71. }
  72. }
  73. ]);
  74. }
  75. for(i=lastChecked,len=items.length;i<len;i++){
  76. if(items[i].nodeName=="INPUT"){
  77. if(items[i].checked==false) items[i].click()
  78. }else{
  79. setTimeout('items['+i+'].click();',(i-lastChecked)*10);
  80. }
  81. }
  82. lastChecked = items.length;
  83. scrollEl.scrollTop = scrollEl.scrollHeight;
  84. if(scrollEl.scrollTop==oldScrollT){
  85. scrollStay++;
  86. }else{
  87. scrollStay=0;
  88. }
  89. oldScrollT = scrollEl.scrollTop;
  90. }
  91.  
  92.  
  93. ///TEMP :D///
  94. function makeMsg(title,msg,buttons){
  95. if(mainDiv){
  96. mainDiv.remove();
  97. }
  98. mainDiv = document.createElement("div");
  99. //mainDiv.setAttribute("class","_1yv");
  100. mainDiv.setAttribute("style","margin: 0 auto 40px;z-index: 10000;position: fixed;left: -webkit-calc(50% - 200px);top: -webkit-calc(50% - 59px);width: 400px;");
  101. mainDiv.innerHTML = '<div style="border: 10px solid rgba(82, 82, 82, .7);-webkit-border-radius: 8px;">\
  102. <div style="background-color: #fff;">\
  103. <div>\
  104. <div style="padding:5px 10px;background-color: #6d84b4;border: 1px solid #3b5998;border-bottom: 0;color: #fff;font-size: 14px;font-weight: bold;">'+title+'</div>\
  105. <div style="padding:10px;border-color: #555;border-style: solid;border-width: 0 1px;">'+msg+'</div>\
  106. <div style="border-color: #555;border-style: solid;border-width: 0 1px;border-bottom-width: 1px;">\
  107. <style type="text/css">\
  108. ._42gy {font-size: 13px;height: 23px;line-height: 23px;}._42fu, ._42gx:focus, ._42gx:hover {text-decoration: none !important;background-image: url(https://fbstatic-a.akamaihd.net/rsrc.php/v2/yG/r/5x8ZAH1D-Ql.png);background-repeat: no-repeat;background-size: auto;background-position: -352px -446px;background-color: #eee;border: 1px solid #999;border-bottom-color: #888;-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .1);}._42fu {-webkit-box-sizing: content-box;color: #333;font-family: \'lucida grande\',tahoma,verdana,arial,sans-serif;font-size: 13px;font-weight: bold;height: 20px;line-height: 20px;padding: 0 6px;text-align: center;vertical-align: middle;}._42ft {cursor: pointer;display: inline-block;text-decoration: none;white-space: nowrap;}._42fu:active, ._42fu._42fs {background: #ddd;border-bottom-color: #999;-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .2);}._42g- {background-image: url(https://fbstatic-a.akamaihd.net/rsrc.php/v2/yG/r/5x8ZAH1D-Ql.png);background-repeat: no-repeat;background-size: auto;background-position: -352px -495px;background-color: #5b74a8;border-color: #29447e #29447e #1a356e;color: #fff;}._42g-:active, ._42g-._42fs {background: #4f6aa3;border-bottom-color: #29447e;}._42gy {font-size: 13px;height: 23px;line-height: 23px;}\
  109. </style>\
  110. <div style="text-align: right;padding: 10px;background-color: #f2f2f2;border: 1px solid #ccc;border-bottom: none;border-left: none;border-right: none;" id="FBIAB"></div>\
  111. </div>\
  112. </div>\
  113. </div>\
  114. </div>';
  115.  
  116. document.body.appendChild(mainDiv);
  117. for(var i=0;i<buttons.length;i++){
  118. var button = buttons[i];
  119. var buttonEl = document.createElement("a");
  120. buttonEl.setAttribute("class","_42ft _42fu _42gy");
  121. buttonEl.setAttribute("href",button.href || "#");
  122. buttonEl.setAttribute("target","_blank");
  123. buttonEl.innerHTML = button.name;
  124.  
  125. if(button.type==1){
  126. buttonEl.setAttribute("class","_42ft _42fu _42gy _42g-");
  127. }
  128. if(button.click){
  129. buttonEl.addEventListener("click",button.click,false);
  130. }
  131. document.getElementById("FBIAB").appendChild(buttonEl);
  132. }
  133.  
  134. }
  135. ///LOL///
Add Comment
Please, Sign In to add comment