From 11cbc5177c78c256c15cadc754df8b7e97092447 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 27 Jan 2011 22:15:49 -0500 Subject: [PATCH] Make waitForPageLoad interruptable. --HG-- branch : key-processing --- common/content/events.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/content/events.js b/common/content/events.js index a1393e60..7b6a084f 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -913,11 +913,7 @@ var Events = Module("events", { dactyl.echo("Waiting for page to load...", commandline.DISALLOW_MULTILINE); const maxWaitTime = (time || 25); - let start = Date.now(); - let end = start + (maxWaitTime * 1000); - - util.waitFor(function () !events.feedingKeys || buffer.loaded, this, maxWaitTime); - commandline.clear(); + util.waitFor(function () !events.feedingKeys || buffer.loaded, this, maxWaitTime * 1000, true); if (!buffer.loaded) dactyl.echoerr("Page did not load completely in " + maxWaitTime + " seconds. Macro stopped.");