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

Stricter number option parsing (and comment out some dump statements)

This commit is contained in:
Kris Maglione
2009-01-28 09:15:26 -05:00
parent a29e5246d1
commit 70022ff0af
4 changed files with 7 additions and 10 deletions

View File

@@ -1120,7 +1120,7 @@ function Events() //{{{
waitForPageLoad: function ()
{
liberator.dump("start waiting in loaded state: " + buffer.loaded);
//liberator.dump("start waiting in loaded state: " + buffer.loaded);
liberator.threadYield(true); // clear queue
if (buffer.loaded == 1)
@@ -1133,8 +1133,8 @@ function Events() //{{{
while (now = Date.now(), now < end)
{
liberator.threadYield();
if ((now - start) % 1000 < 10)
liberator.dump("waited: " + (now - start) + " ms");
//if ((now - start) % 1000 < 10)
// liberator.dump("waited: " + (now - start) + " ms");
if (!events.feedingKeys)
return false;
@@ -1153,7 +1153,7 @@ function Events() //{{{
let ret = (buffer.loaded == 1);
if (!ret)
liberator.echoerr("Page did not load completely in " + maxWaitTime + " seconds. Macro stopped.");
liberator.dump("done waiting: " + ret);
//liberator.dump("done waiting: " + ret);
// sometimes the input widget had focus when replaying a macro
// maybe this call should be moved somewhere else?
@@ -1217,7 +1217,7 @@ function Events() //{{{
{
if (config.isComposeWindow)
{
liberator.dump("Compose editor got focus");
//liberator.dump("Compose editor got focus");
modes.set(modes.INSERT, modes.TEXTAREA);
}
else if (liberator.mode != modes.MESSAGE)

View File

@@ -510,8 +510,6 @@ function Hints() //{{{
return function (linkText)
{
liberator.dump(hintStrings);
if (hintStrings.length == 1 && hintStrings[0].length == 0)
return true;

View File

@@ -1417,7 +1417,6 @@ window.liberator = liberator;
// FIXME: Ugly, etc.
window.addEventListener("liberatorHelpLink", function (event) {
let elem = event.target;
liberator.dump(String(elem));
if (/^(option|mapping|command)$/.test(elem.className))
var tag = elem.textContent.replace(/\s.*/, "");
if (elem.className == "command")

View File

@@ -203,9 +203,9 @@ Option.prototype = {
break;
case "number":
let value = parseInt(values); // deduce radix
let value = Number(values); // deduce radix
if (isNaN(value))
if (isNaN(value) || value != parseInt(value))
return "E521: Number required";
switch (operator)