Last active
August 29, 2015 14:03
-
-
Save coleww/75029e1243284b9374be to your computer and use it in GitHub Desktop.
like every
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
var likes = document.getElementsByClassName('UFILikeLink'); | |
var comment_likes = []; | |
var post_likes = []; | |
for(var i = 0; i<likes.length; i++){ | |
if (likes[i].getAttribute('title') === 'Like this') { | |
post_likes.push(likes[i]); | |
} else if (likes[i].getAttribute('title') === 'Like this comment') { | |
comment_likes.push(likes[i]); | |
} | |
} | |
var zed = 0; | |
var ned = 0; | |
var likeStuff = function(){ | |
window.setTimeout(function(){ | |
if(Math.random() < 0.666){ | |
post_likes[zed].click() | |
} else { | |
comment_likes[ned].click() | |
} | |
zed++; | |
ned++; | |
if (zed < post_likes.length && ned < comment_likes.length){ | |
likeStuff(); | |
} | |
}, 1050); | |
}; | |
likeStuff(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment