From 153536799aaef3ad5d812db8f0d2377fedfb38b8 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Mon, 5 Jan 2009 06:09:57 +0100 Subject: [PATCH] dont output continous "Waiting for page to load..." as a message --- common/content/events.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/content/events.js b/common/content/events.js index 5e3d3ec4..8d132e56 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1092,8 +1092,9 @@ function Events() //{{{ if (buffer.loaded == 1) return true; + const maxWaitTime = 25; let start = Date.now(); - let end = start + 25000; // maximum time to wait - TODO: add option + let end = start + (maxWaitTime * 1000); // maximum time to wait - TODO: add option let now; while (now = Date.now(), now < end) { @@ -1110,14 +1111,14 @@ function Events() //{{{ break; } else - liberator.echomsg("Waiting for page to load..."); + liberator.echo("Waiting for page to load...", commandline.DISALLOW_MULTILINE); } modes.show(); // TODO: allow macros to be continued when page does not fully load with an option let ret = (buffer.loaded == 1); if (!ret) - liberator.echoerr("Page did not load completely in " + ms + " milliseconds. Macro stopped."); + liberator.echoerr("Page did not load completely in " + maxWaitTime + " seconds. Macro stopped."); liberator.dump("done waiting: " + ret); // sometimes the input widget had focus when replaying a macro