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:
@@ -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)
|
||||
|
||||
@@ -510,8 +510,6 @@ function Hints() //{{{
|
||||
|
||||
return function (linkText)
|
||||
{
|
||||
liberator.dump(hintStrings);
|
||||
|
||||
if (hintStrings.length == 1 && hintStrings[0].length == 0)
|
||||
return true;
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user