Skip to content

Instantly share code, notes, and snippets.

@treby
Created April 13, 2014 16:51
Show Gist options
  • Save treby/10592180 to your computer and use it in GitHub Desktop.
Save treby/10592180 to your computer and use it in GitHub Desktop.
Cheat pokemon master :-P
http://hoget.web.fc2.com/pokesay.html
var p = 0;
var pokeArray = new Array();
$.ajax({
url : "pokemon.xml",
dataType : 'xml',
success : function(data) {
$("pokemon", data).each(function() {
pokeArray[p] = $("Name", this).text();
p++;
});
}
});
pokeArray.forEach(function(name){
$('input.anser').val(name);
$('input.submitAnserButton').trigger('click');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment