Created
August 3, 2014 16:06
-
-
Save glepur/4301b8068dd822b9d535 to your computer and use it in GitHub Desktop.
Facebook like spam - add to bookmark and press on facebook page to "like" everything
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript: (function () { | |
| var a = document.getElementsByTagName("a"); | |
| var content = document.getElementById("contentArea"); | |
| for(var i=0;i<a.length;i++){ | |
| if(a[i].innerHTML=="Like" && hasParent(a[i],content)) | |
| a[i].click(); | |
| } | |
| function hasParent(child, parent) { | |
| var node = child.parentNode; | |
| while (node!=null) { | |
| if (node==parent) { | |
| return true; | |
| } | |
| node = node.parentNode; | |
| } | |
| return false; | |
| } | |
| }()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment