Last active
December 21, 2015 04:39
-
-
Save aruss/6251258 to your computer and use it in GitHub Desktop.
This file contains 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
// paste it in your browsers console while surfing on facebook and you will like all things | |
(function (){ | |
var d = [], | |
i = 0, | |
l = 0, | |
li = setInterval(function() { | |
if (i < l) { | |
console.log('like ' + i + ' out of ' + l); | |
d[i].onclick(); | |
i++; | |
} | |
else { | |
setTimeout(function() { | |
window.scroll(0, window.pageYOffset + 100); | |
}, 500); | |
} | |
},400), | |
f = function() { | |
var d2 = document.getElementsByClassName('UFILikeLink'); | |
for(var di = 0, dl = d2.length; di < dl; di++) { | |
if (d2[di]['title'].indexOf('unlike') == -1) { | |
d.push(d2[di]); | |
} | |
} | |
l = d.length; | |
}, | |
si = setTimeout(f, 0); | |
window.onscroll = function() { | |
clearTimeout(si); | |
si = setTimeout(f, 1000); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change
if (d2[di]['title'].indexOf('unlike') == -1)
toif (d2[di]['title'].indexOf('unlike') == 0)
to unlike them all :D