Guest MEowmixxxx Posted August 10, 2011 Share Posted August 10, 2011 (edited) Written in JS. This is how us lazy people win poke wars on facebook. Watch and learn. var post_form_id = document.getElementsByName('post_form_id')[0].value; var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; var j = k = 0; var links = document.getElementById("pagelet_pokes").getElementsByTagName("a"); for(var i = 0; i < links.length; i+=3) { if(links[i].innerText.indexOf("Show all") != -1) continue; console.log("Poking " + links[i].innerText); poke(links[i + 1].getAttribute("ajaxify").split("=")[1].split("&")[0]); for(j = 0; j <= 999999; j++) {k = 100;} } function poke(uid) { var httpwp = new XMLHttpRequest(); var urlwp = "/ajax/poke.php?__a=1"; var paramswp = "&post_form_id=" + post_form_id + "&uid=" + uid + "&fb_dtsg=" + fb_dtsg + "&pokeback=1" + "&post_form_id_source=AsyncRequest" + "&pk01=Poke"; httpwp.open("POST", urlwp, true); httpwp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); //httpwp.setRequestHeader("Content-length", paramswp.length); //httpwp.setRequestHeader("Connection", "keep-alive"); httpwp.onreadystatechange = function() { if(httpwp.readyState == 4 && httpwp.status == 200) { console.log("ajax request complete"); } } httpwp.send(paramswp); } Edited August 10, 2011 by MEowmixxxx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now