Last active
October 19, 2015 13:44
-
-
Save athlan/11160066 to your computer and use it in GitHub Desktop.
Facebook Like birthday wishes
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
/** | |
* Script to like all birthday wishes on timeline | |
* By Piotr Pelczar | |
* | |
* Usage: | |
* 1. Activate programming console in Google Chrome (F12) | |
* 2. Go to the console tab | |
* 3. Expand all wishes list (see more) as it reach end | |
* 4. Copy this script, paste and hit ENTER | |
* 5. MAGIC HAPPENS!!! Massive amount POST like requests are sent to Facebook | |
*/ | |
document.getElementsByClassName('contentAfter')[0].getElementsByClassName('UFILikeLink') | |
function eventFire(el, etype){ | |
if (el.fireEvent) { | |
(el.fireEvent('on' + etype)); | |
} else { | |
var evObj = document.createEvent('Events'); | |
evObj.initEvent(etype, true, false); | |
el.dispatchEvent(evObj); | |
} | |
} | |
for(var i = 0, j = a.length; i<j; ++i) if(a[i].title == 'Like this') eventFire(a[i], 'click'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uncaught TypeError: Cannot read property 'getElementsByClassName' of undefined(…)