Skip to content

Instantly share code, notes, and snippets.

@vanduc1102
Created April 15, 2017 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanduc1102/d385fd401f8abdf804ec397238751440 to your computer and use it in GitHub Desktop.
Save vanduc1102/d385fd401f8abdf804ec397238751440 to your computer and use it in GitHub Desktop.
facebook auto like, Open console with F12 and Paste the code.
var arr= Array.prototype.slice.call(document.querySelectorAll('.UFILikeLink'));
var index = 0;
setInterval(function(){
var a = arr.shift();
if(a.className.indexOf("UFILinkBright") < 0){
console.log("like : ",++index);
a.click();
}
if(arr.length == 0){
document.querySelectorAll('a.UFIPagerLink')[0].click();
console.log("finish a pack, loading another pack");
arr= Array.prototype.slice.call(document.querySelectorAll('a.UFILikeLink'));
}
},1000);
@sopheak66
Copy link

What is className modified for?

@Dfcrespi
Copy link

Dfcrespi commented Nov 9, 2022

6JViSMeQ5HGU.js?_nc_x=lphY6DB8pg1&_nc_eui2=AeHHOuhB7kHSLi9wwINzlVj0mUtcAAodlB6ZS1wACh2UHro3Uba52s2z8C4Bfrqq9kyCj8FqxrgX8X3jTG7eRFXQ:58 ErrorUtils caught an error:

Cannot read properties of undefined (reading 'className')

Subsequent non-fatal errors won't be logged; see https://fburl.com/debugjs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment