Skip to content

Instantly share code, notes, and snippets.

@pcalves
Forked from whichlight/like-bomb.js
Created January 15, 2013 17:03
Show Gist options
  • Save pcalves/4540137 to your computer and use it in GitHub Desktop.
Save pcalves/4540137 to your computer and use it in GitHub Desktop.
/*
This code will click like's currently loaded
on a facebook page. It's likely in the future
the name of the classes may change.
Be careful though, if you do too many at once
you'll get a warning.
To use this copy and paste it to your browser's
javascript console, or add javascript: to the
beginning and paste it all in your browser address bar.
disclaimer: this is not intended for actual use,
and only educational purposes.
*/
var A = document.getElementsByClassName("like_link stat_elem as_link");
var B = document.getElementsByClassName("stat_elem as_link cmnt_like_link");
var a = [];
for(i in A){a.push(A[i])};
for(i in B){a.push(B[i])};
for(i in a){if(a[i].title=="Like this item"){a[i].click();}};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment