Code kết bạn facebook tự động

var page = 0;
var nb_pageload = 10;
var loadpage = setInterval(function(){
if(page <= nb_pageload)
{
console.log(‘load page friends: ‘+page);
var uiMorePagerPrimary = document.getElementsByClassName(‘uiMorePagerPrimary’);
for (ij = 0; ij < uiMorePagerPrimary.length; ij++) {
uiMorePagerPrimary[ij].click();
//window.scrollTo(0,document.body.scrollHeight);
}
page++;
}
else
{
clearInterval(loadpage);
var i = 0;
var addfr = document.getElementsByClassName(‘addButton’);
setInterval(function(){
if (typeof addfr[i] != ‘undefined’) {
addfr[i].click();
var uiLayer = document.getElementsByClassName(‘uiLayer’);
for (j = 0; j < uiLayer.length; j++) {
uiLayer[j].remove();
}
console.log(‘Click friends: ‘+i);
}
else
{
console.log(‘xong het’);
}
i++;
}, 1000);
}
}, 4000);