From 6a4a7f7a8cf9f4bf590bdd7e1c511a672a8d3871 Mon Sep 17 00:00:00 2001 From: Elbert Alias Date: Sun, 29 Jan 2017 11:02:33 +1100 Subject: [PATCH] Make timeout configurable per driver --- src/drivers/bookmarklet/js/driver.js | 2 ++ src/drivers/chrome/js/driver.js | 2 ++ src/drivers/firefox/driver.js | 2 ++ src/drivers/firefox/lib | 2 +- src/drivers/phantomjs/driver.js | 2 ++ src/wappalyzer.js | 2 +- 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/drivers/bookmarklet/js/driver.js b/src/drivers/bookmarklet/js/driver.js index a40554b11..f939ff2cd 100644 --- a/src/drivers/bookmarklet/js/driver.js +++ b/src/drivers/bookmarklet/js/driver.js @@ -59,6 +59,8 @@ ; w.driver = { + timeout: 1000, + /** * Log messages to console */ diff --git a/src/drivers/chrome/js/driver.js b/src/drivers/chrome/js/driver.js index 724068861..08948419f 100644 --- a/src/drivers/chrome/js/driver.js +++ b/src/drivers/chrome/js/driver.js @@ -15,6 +15,8 @@ headersCache = {}; w.driver = { + timeout: 1000, + /** * Log messages to console */ diff --git a/src/drivers/firefox/driver.js b/src/drivers/firefox/driver.js index 6c4cc29c5..f2fd0a146 100644 --- a/src/drivers/firefox/driver.js +++ b/src/drivers/firefox/driver.js @@ -343,6 +343,8 @@ } w.driver = { + timeout: 1000, + /** * Log messages to console */ diff --git a/src/drivers/firefox/lib b/src/drivers/firefox/lib index 565db1af4..6b21a4c4c 100644 --- a/src/drivers/firefox/lib +++ b/src/drivers/firefox/lib @@ -125,7 +125,7 @@ var wappalyzer = (function() { this.lastTime = new Date().getTime(); - this.timedOut = this.lastTime - this.startTime > 1000; + this.timedOut = this.lastTime - this.startTime > w.driver.timeout; } }; diff --git a/src/drivers/phantomjs/driver.js b/src/drivers/phantomjs/driver.js index a11c07da8..3137a8489 100644 --- a/src/drivers/phantomjs/driver.js +++ b/src/drivers/phantomjs/driver.js @@ -52,6 +52,8 @@ } wappalyzer.driver = { + timeout: 1000, + /** * Log messages to console */ diff --git a/src/wappalyzer.js b/src/wappalyzer.js index 565db1af4..6b21a4c4c 100644 --- a/src/wappalyzer.js +++ b/src/wappalyzer.js @@ -125,7 +125,7 @@ var wappalyzer = (function() { this.lastTime = new Date().getTime(); - this.timedOut = this.lastTime - this.startTime > 1000; + this.timedOut = this.lastTime - this.startTime > w.driver.timeout; } };