Skip to content

Instantly share code, notes, and snippets.

@zkat
Created May 4, 2012 02:20
Show Gist options
  • Select an option

  • Save zkat/2591434 to your computer and use it in GitHub Desktop.

Select an option

Save zkat/2591434 to your computer and use it in GitHub Desktop.
Automated Pokewar Victory
// Paste this into a console on the Facebook poke page, challenge a friend.
setInterval(function () {
var iterator = document.evaluate("//a[contains(@ajaxify, 'poke_inline.php')]", document, null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null);
try {
var thisNode = iterator.iterateNext();
while (thisNode) {
console.log('poking');
thisNode.click();
thisNode = iterator.iterateNext();
}
}
catch (e) {}
}, 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment