Skip to content

Instantly share code, notes, and snippets.

@jamesl1001
Last active January 15, 2018 14:28
Show Gist options
  • Save jamesl1001/5dee9d9ddfff36de29b461d35c386780 to your computer and use it in GitHub Desktop.
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
// ==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