intel-screenbot

An Ingress Intel Map Bot for Hangoutsbot
git clone git://archive.git.mtrnord.blog/MTRNord/intel-screenbot.git
Log | Files | Refs | README | LICENSE

commit 29cbc6440615257dc394fe007a88e3422f2a3065
parent 8a510b03a377a203ca614b20f8ecd6dddb61d997
Author: Marcel <MTRNord@users.noreply.github.com>
Date:   Sun, 13 Nov 2016 14:48:50 +0100

Try to fix searching
Diffstat:
Mscreencap_iitc.js | 46++++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 22 deletions(-)

diff --git a/screencap_iitc.js b/screencap_iitc.js @@ -110,28 +110,30 @@ function afterCookieLogin(IntelURL, search) { } }, search); } - waitFor({ - timeout: 120000, - check: function () { - return page.evaluate(function() { - if (document.querySelector('.map').textContent.indexOf('done') != -1) { - return true; - }else{ - return false; - } - }); - }, - success: function () { - hideDebris(); - prepare('1920', '1080'); - main(); - }, - error: function () { - hideDebris(); - prepare('1920', '1080'); - main(); - } // optional - }); + setTimeout(function() { + waitFor({ + timeout: 120000, + check: function () { + return page.evaluate(function() { + if (document.querySelector('.map').textContent.indexOf('done') != -1) { + return true; + }else{ + return false; + } + }); + }, + success: function () { + hideDebris(); + prepare('1920', '1080'); + main(); + }, + error: function () { + hideDebris(); + prepare('1920', '1080'); + main(); + } // optional + }); + }, "3000"); }, "5000"); }); }