Last active
January 13, 2017 21:11
-
-
Save kylebradshaw/0fb66ffa71e0e4eea6d48896a3645361 to your computer and use it in GitHub Desktop.
snipe pokedex100
This file contains 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
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