Last active
January 15, 2018 14:28
-
-
Save jamesl1001/5dee9d9ddfff36de29b461d35c386780 to your computer and use it in GitHub Desktop.
Autoclicks the "Scan Location" button and closes the "scan did not start" dialog on pokehuntr.com
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
// ==UserScript== | |
// @name PokeHuntrAutoclick | |
// @namespace http://jalproductions.co.uk/ | |
// @version 0.3 | |
// @description Autoclicks the "Scan Location" button and closes the "scan did not start" dialog. | |
// @author JaL Productions | |
// @copyright 2018, JaL Productions | |
// @downloadURL https://gist.github.com/jamesl1001/5dee9d9ddfff36de29b461d35c386780/raw/PokeHuntrAutoclick.user.js | |
// @match https://pokehuntr.com/ | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js | |
// ==/UserScript== | |
var btn = '#scan'; | |
var interval = 120000; | |
waitForKeyElements(btn, function() { | |
autoclick(); | |
setInterval(autoclick, interval); | |
}); | |
function autoclick() { | |
console.log('Clicked'); | |
$(btn).click(); | |
setTimeout(autoclose, 500); | |
} | |
function autoclose() { | |
$('.confirm').click(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment