Skip to content

Instantly share code, notes, and snippets.

@kylebradshaw
Last active January 13, 2017 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylebradshaw/0fb66ffa71e0e4eea6d48896a3645361 to your computer and use it in GitHub Desktop.
Save kylebradshaw/0fb66ffa71e0e4eea6d48896a3645361 to your computer and use it in GitHub Desktop.
snipe pokedex100
function snipeAlert(pokemon,iv) {
pokemon = pokemon || 'Dragonite';
iv = iv || 100;
var html = angular.element('.table-condensed').html();
var re = new RegExp(`${pokemon}<\/strong>\\n*\\s*\\t*<strong class="iv ng-binding">[${iv}]+<\/strong>`,'gi');
if(html.match(re)) {
window.alert(`Catch that ${iv}, ${pokemon}!!`);
}
}
setInterval(snipeAlert, 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment