1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-27 14:15:47 +01:00

Make waitForPageLoad interruptable.

--HG--
branch : key-processing
This commit is contained in:
Kris Maglione
2011-01-27 22:15:49 -05:00
parent abb434ce7c
commit 11cbc5177c

View File

@@ -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.");