Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ckeckbox_items = document.getElementsByName("checkableitems[]");
- var button_items = document.getElementsByClassName("uiButton _1sm");
- var invite_2_el = document.getElementsByClassName("uiScrollableAreaContent");
- if(invite_2_el[invite_2_el.length-1].children[0].children[1]){
- var classNameX = invite_2_el[invite_2_el.length-1].children[0].children[1].children[0].classList[0];
- var circle_items = invite_2_el[invite_2_el.length-1].getElementsByClassName(classNameX);
- }
- var lastChecked = 0;
- var scrollStay = 0;
- var scrollEl = document.querySelector(".fbProfileBrowserResult.scrollable.threeColumns") || document.querySelector("._1v3l .uiScrollableAreaWrap") || document.querySelector("._4ilb .uiScrollableAreaWrap");
- var oldScrollT = -1;
- var interval,mainDiv;
- if(scrollEl){
- makeMsg(" جااري تحميل الاصدقاء","By mahmoud nour https://www.facebook.com/OFF.EG - <br> الحيتان - احمد سمير الله يرحمو -.",[
- {
- name:"Cancel",
- click:function(){
- clearInterval(interval);
- mainDiv.remove();
- }
- }
- ]);
- var interValTime= 600;
- if(button_items.length!=0){
- items = button_items;
- interValTime= 5000;
- //console.log("TYPE:BUTTONS");
- } else if(ckeckbox_items.length!=0){
- items = ckeckbox_items;
- interValTime= 600;
- //console.log("TYPE:CHECKBOXS");
- }else{
- items = circle_items;
- interValTime= 5000;
- //console.log("TYPE:C");
- }
- if(button_items) scrolling();
- interval = setInterval(scrolling,interValTime);
- }else{
- makeMsg("Warning","لقد نسيت شي ,اولا اضغط على دعوة الأصدقاء لهذه الصفحة.",[
- {
- name:"Close",
- click:function(){
- mainDiv.remove();
- }
- }
- ]);
- }
- function scrolling(){
- if(scrollStay==2){
- clearInterval(interval);
- makeMsg("Done"," by mahmoud nour https://www.facebook.com/OFF.EG <br> الحيتان - احمد سمير الله يرحمو -, جااري تحميل الاصدقاء .<br>If you like it please share & rate it.",[
- {
- type:1,
- name:"Share",
- href:"https://www.facebook.com/sharer/sharer.php?u=https://www.facebook.com/OFF.EG"
- },
- {
- type:1,
- name:"Rate",
- href:"https://www.facebook.com/OFF.EG"
- },
- {
- name:"Close",
- click:function(){
- mainDiv.remove();
- }
- }
- ]);
- }
- for(i=lastChecked,len=items.length;i<len;i++){
- if(items[i].nodeName=="INPUT"){
- if(items[i].checked==false) items[i].click()
- }else{
- setTimeout('items['+i+'].click();',(i-lastChecked)*10);
- }
- }
- lastChecked = items.length;
- scrollEl.scrollTop = scrollEl.scrollHeight;
- if(scrollEl.scrollTop==oldScrollT){
- scrollStay++;
- }else{
- scrollStay=0;
- }
- oldScrollT = scrollEl.scrollTop;
- }
- ///TEMP :D///
- function makeMsg(title,msg,buttons){
- if(mainDiv){
- mainDiv.remove();
- }
- mainDiv = document.createElement("div");
- //mainDiv.setAttribute("class","_1yv");
- mainDiv.setAttribute("style","margin: 0 auto 40px;z-index: 10000;position: fixed;left: -webkit-calc(50% - 200px);top: -webkit-calc(50% - 59px);width: 400px;");
- mainDiv.innerHTML = '<div style="border: 10px solid rgba(82, 82, 82, .7);-webkit-border-radius: 8px;">\
- <div style="background-color: #fff;">\
- <div>\
- <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>\
- <div style="padding:10px;border-color: #555;border-style: solid;border-width: 0 1px;">'+msg+'</div>\
- <div style="border-color: #555;border-style: solid;border-width: 0 1px;border-bottom-width: 1px;">\
- <style type="text/css">\
- ._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;}\
- </style>\
- <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>\
- </div>\
- </div>\
- </div>\
- </div>';
- document.body.appendChild(mainDiv);
- for(var i=0;i<buttons.length;i++){
- var button = buttons[i];
- var buttonEl = document.createElement("a");
- buttonEl.setAttribute("class","_42ft _42fu _42gy");
- buttonEl.setAttribute("href",button.href || "#");
- buttonEl.setAttribute("target","_blank");
- buttonEl.innerHTML = button.name;
- if(button.type==1){
- buttonEl.setAttribute("class","_42ft _42fu _42gy _42g-");
- }
- if(button.click){
- buttonEl.addEventListener("click",button.click,false);
- }
- document.getElementById("FBIAB").appendChild(buttonEl);
- }
- }
- ///LOL///
Add Comment
Please, Sign In to add comment