Skip to content

Instantly share code, notes, and snippets.

@agungf
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save agungf/e850ed54c559baa531c7 to your computer and use it in GitHub Desktop.

Select an option

Save agungf/e850ed54c559baa531c7 to your computer and use it in GitHub Desktop.

Revisions

  1. agungf revised this gist Oct 4, 2014. 1 changed file with 6 additions and 8 deletions.
    14 changes: 6 additions & 8 deletions FB panpage auto invite
    Original file line number Diff line number Diff line change
    @@ -24,12 +24,10 @@ setTimeout(function(){
    var inputs = document.getElementsByClassName('_4jy0 _4jy3 _517h _42ft');
    var clicked = 0;
    for(var i=0; i<inputs.length;i++) {
    inputs[i].click();
    clicked++;
    console.log(i+" ok!");
    }
    setTimeout(function(){
    console.log(clicked+" clicked to invite!");
    console.log("done !");
    }, 5*1000);
    inputs[i].click();
    clicked++;
    console.log(i+" ok!");
    }
    console.log(clicked+" clicked to invite!");
    console.log("done !");
    }, 60*1000);
  2. agungf revised this gist Sep 30, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions FB panpage auto invite
    Original file line number Diff line number Diff line change
    @@ -5,14 +5,14 @@ for(var i=0; i<allFriends.length;i++) {
    console.log("allFriends link clicked!");
    }

    //scroll down every 5 seconds
    //scroll down every seconds
    var showAll = setInterval(function() {
    var objDiv = document.getElementsByClassName('_5tee');
    var elements = objDiv[0].getElementsByTagName('li');
    elements[elements.length - 1].scrollIntoView();
    console.log("total friends displayed: ");
    console.log(elements.length - 1);
    }, 5000);
    }, 1000);


    //delay invites for a minutes
  3. agungf revised this gist Sep 29, 2014. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions FB panpage auto invite
    Original file line number Diff line number Diff line change
    @@ -2,15 +2,15 @@
    var allFriends = document.getElementsByClassName('_5tef');
    for(var i=0; i<allFriends.length;i++) {
    allFriends[i].click();
    console.log("allFriends clicked!: "+i);
    console.log("allFriends link clicked!");
    }

    //scroll down every 5 seconds
    var showAll = setInterval(function() {
    var objDiv = document.getElementsByClassName('_5tee');
    var elements = objDiv[0].getElementsByTagName('li');
    elements[elements.length - 1].scrollIntoView();
    console.log("last elements: ");
    console.log("total friends displayed: ");
    console.log(elements.length - 1);
    }, 5000);

    @@ -28,6 +28,8 @@ setTimeout(function(){
    clicked++;
    console.log(i+" ok!");
    }
    console.log(clicked+" clicked to invite!");
    console.log("done !");
    setTimeout(function(){
    console.log(clicked+" clicked to invite!");
    console.log("done !");
    }, 5*1000);
    }, 60*1000);
  4. agungf revised this gist Sep 29, 2014. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions FB panpage auto invite
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,12 @@
    //click all friends link and scroll down every 5 seconds
    var showAll = setInterval(function() {
    //click all friends
    var allFriends = document.getElementsByClassName('_5tef');
    for(var i=0; i<allFriends.length;i++) {
    allFriends[i].click();
    console.log("allFriends clicked!: "+i);
    }
    //scroll elements
    //click all friends link
    var allFriends = document.getElementsByClassName('_5tef');
    for(var i=0; i<allFriends.length;i++) {
    allFriends[i].click();
    console.log("allFriends clicked!: "+i);
    }

    //scroll down every 5 seconds
    var showAll = setInterval(function() {
    var objDiv = document.getElementsByClassName('_5tee');
    var elements = objDiv[0].getElementsByTagName('li');
    elements[elements.length - 1].scrollIntoView();
  5. agungf revised this gist Sep 29, 2014. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions FB panpage auto invite
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    //click all friends link and scroll down every seconds
    //click all friends link and scroll down every 5 seconds
    var showAll = setInterval(function() {
    //click all friends
    var allFriends = document.getElementsByClassName('_5tef');
    @@ -12,7 +12,7 @@ var showAll = setInterval(function() {
    elements[elements.length - 1].scrollIntoView();
    console.log("last elements: ");
    console.log(elements.length - 1);
    }, 1000);
    }, 5000);


    //delay invites for a minutes
    @@ -26,6 +26,7 @@ setTimeout(function(){
    for(var i=0; i<inputs.length;i++) {
    inputs[i].click();
    clicked++;
    console.log(i+" ok!");
    }
    console.log(clicked+" clicked to invite!");
    console.log("done !");
  6. agungf revised this gist Sep 29, 2014. 1 changed file with 4 additions and 8 deletions.
    12 changes: 4 additions & 8 deletions FB panpage auto invite
    Original file line number Diff line number Diff line change
    @@ -19,18 +19,14 @@ var showAll = setInterval(function() {
    setTimeout(function(){
    console.log("processing to click invite buttons.....");
    //stop scrolling
    clearInterval(showAll);

    clearInterval(showAll);
    //click every invites every second
    var inputs = document.getElementsByClassName('_4jy0 _4jy3 _517h _42ft');
    var clicked = 0;
    for(var i=0; i<inputs.length;i++) {
    inputs[i].click();
    setTimeout(function(){
    i++
    },5);
    clicked++;
    }
    console.log(clicked)
    console.log("clicked to invite!");

    console.log(clicked+" clicked to invite!");
    console.log("done !");
    }, 60*1000);
  7. agungf revised this gist Sep 29, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion FB panpage auto invite
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ var showAll = setInterval(function() {
    setTimeout(function(){
    console.log("processing to click invite buttons.....");
    //stop scrolling
    clearTimeout(showAll);
    clearInterval(showAll);

    //click every invites every second
    var inputs = document.getElementsByClassName('_4jy0 _4jy3 _517h _42ft');
  8. agungf revised this gist Sep 29, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions FB panpage auto invite
    Original file line number Diff line number Diff line change
    @@ -17,8 +17,10 @@ var showAll = setInterval(function() {

    //delay invites for a minutes
    setTimeout(function(){
    console.log("processing to click invite buttons.....");
    //stop scrolling
    clearTimeout(showAll);

    //click every invites every second
    var inputs = document.getElementsByClassName('_4jy0 _4jy3 _517h _42ft');
    var clicked = 0;
  9. agungf revised this gist Sep 29, 2014. 1 changed file with 0 additions and 9 deletions.
    9 changes: 0 additions & 9 deletions howto
    Original file line number Diff line number Diff line change
    @@ -1,9 +0,0 @@
    1. open fanpage using chrome browser
    2. open console (f12)
    3. copy and paste above script
    4. run (press enter)

    note what it does:
    1. click show all friends
    2. scrolling down to show as much as possible uninvited friends (wait for 1 minutes)
    3. click the invite button
  10. agungf created this gist Sep 29, 2014.
    34 changes: 34 additions & 0 deletions FB panpage auto invite
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    //click all friends link and scroll down every seconds
    var showAll = setInterval(function() {
    //click all friends
    var allFriends = document.getElementsByClassName('_5tef');
    for(var i=0; i<allFriends.length;i++) {
    allFriends[i].click();
    console.log("allFriends clicked!: "+i);
    }
    //scroll elements
    var objDiv = document.getElementsByClassName('_5tee');
    var elements = objDiv[0].getElementsByTagName('li');
    elements[elements.length - 1].scrollIntoView();
    console.log("last elements: ");
    console.log(elements.length - 1);
    }, 1000);


    //delay invites for a minutes
    setTimeout(function(){
    //stop scrolling
    clearTimeout(showAll);
    //click every invites every second
    var inputs = document.getElementsByClassName('_4jy0 _4jy3 _517h _42ft');
    var clicked = 0;
    for(var i=0; i<inputs.length;i++) {
    inputs[i].click();
    setTimeout(function(){
    i++
    },5);
    }
    console.log(clicked)
    console.log("clicked to invite!");

    }, 60*1000);
    9 changes: 9 additions & 0 deletions howto
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    1. open fanpage using chrome browser
    2. open console (f12)
    3. copy and paste above script
    4. run (press enter)

    note what it does:
    1. click show all friends
    2. scrolling down to show as much as possible uninvited friends (wait for 1 minutes)
    3. click the invite button