javascript:var inputs = document.getElementsByClassName('uiButton _1sm');
for(var i=0; i<inputs.length;i++) {
inputs[i].click();
}
Could use some javascript console, but I have no idea how to do it
So you see someone you are interested in, as this would be powerful.
HTML:javascript:var inputs = document.getElementsByClassName('uiButton _1sm'); for(var i=0; i<inputs.length;i++) { inputs[i].click(); }
And that code is not working?
This code is to send invitations to join your Fan page, just opens a pop up to send those invitations.
But the point is to create one that can add mass like that other code, some little detail is escaping.
sorry for my bad English, I speak Spanish
Oh, now I got it!
Give me some minutes and I'll give you a code so you can use it![]()
var abc = 0, static, found=false, interval=500;
function dostuff() {
if(!found){
if(document.getElementsByClassName("_42ft _4jy0 _4jy3 _517h")[abc].getAttribute("data-reactid")!=null{
found=true;
static=abc;
document.getElementsByClassName("_42ft _4jy0 _4jy3 _517h")[static].click();
}else{
console.log("BUTTON TO INVITE FRIEND NOT FOUND, CHECKING NEXT BUTTON "+abc);
}
}else{
document.getElementsByClassName("_42ft _4jy0 _4jy3 _517h")[static].click();
console.log("INVITED FRIEND "+abc);
}
if(abc < document.getElementsByClassName("_42ft _4jy0 _4jy3 _517h").length){
abc++;
setTimeout(dostuff,interval);
}else{
var objDiv = document.getElementsByClassName("uiScrollableAreaWrap")[3];
objDiv.scrollTop = objDiv.scrollHeight;
console.log("LOADED MORE FRIENDS TO INVITE");
if(found){
found=false;
static=0;
abc=0;
setTimeout(dostuff,interval);
}else{
console.log("FINISHED INVITING ALL FRIENDS");
}
}
}
setTimeout(dostuff, interval);
Sorry for the delay, I had to go to bed after I write the last message.
Here is the script, it took me a while to make it, I hope it works with you:
HTML:var abc = 0, static, found=false, interval=500; function dostuff() { if(!found){ if(document.getElementsByClassName("_42ft _4jy0 _4jy3 _517h")[abc].getAttribute("data-reactid")!=null{ found=true; static=abc; document.getElementsByClassName("_42ft _4jy0 _4jy3 _517h")[static].click(); }else{ console.log("BUTTON TO INVITE FRIEND NOT FOUND, CHECKING NEXT BUTTON "+abc); } }else{ document.getElementsByClassName("_42ft _4jy0 _4jy3 _517h")[static].click(); console.log("INVITED FRIEND "+abc); } if(abc < document.getElementsByClassName("_42ft _4jy0 _4jy3 _517h").length){ abc++; setTimeout(dostuff,interval); }else{ var objDiv = document.getElementsByClassName("uiScrollableAreaWrap")[3]; objDiv.scrollTop = objDiv.scrollHeight; console.log("LOADED MORE FRIENDS TO INVITE"); if(found){ found=false; static=0; abc=0; setTimeout(dostuff,interval); }else{ console.log("FINISHED INVITING ALL FRIENDS"); } } } setTimeout(dostuff, interval);
Before you put in the console and run it (to run it, just paste it into the console and press enter), you need to click on the link that says something like "See all friends" on the page where you invite your friends.
I also placed some info for you to know what the script is doing, and that information will be shown in the console. You will also know when all friends were invited and the script will stop after that.
There is a variable at the beggining which is named "interval". You can change it to a lower number if you want the script to run faster yet I wouldn't advice to put a lower number than 50 because some friends may not be invited. I tested with 500 and with 50 and it worked perfectly.