mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 10:18:00 +01:00
declare some undeclared variables in parseOpt and whitespace fixes
This commit is contained in:
@@ -520,7 +520,7 @@ function Bookmarks() //{{{
|
||||
].filter(function (i) i[1])
|
||||
} for each (item in items)));
|
||||
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
||||
},
|
||||
}
|
||||
};
|
||||
//}}}
|
||||
}; //}}}
|
||||
@@ -816,7 +816,7 @@ function History() //{{{
|
||||
let list = template.bookmarks("title", (
|
||||
{
|
||||
title: item[1],
|
||||
url: item[0],
|
||||
url: item[0]
|
||||
} for each (item in items)));
|
||||
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ function Buffer() //{{{
|
||||
}
|
||||
}
|
||||
Styles.prototype = {
|
||||
get sites() util.uniq(util.flatten([v.sites for ([k, v] in this.userSheets)])),
|
||||
get sites() util.uniq(util.flatten([v.sites for ([k, v] in this.userSheets)]))
|
||||
};
|
||||
|
||||
let styles = storage.newObject("styles", Styles, false);
|
||||
@@ -887,7 +887,7 @@ function Buffer() //{{{
|
||||
, filter)],
|
||||
literal: true,
|
||||
options: [[["-index", "-i"], commands.OPTION_INT],
|
||||
[["-name", "-n"], commands.OPTION_STRING]],
|
||||
[["-name", "-n"], commands.OPTION_STRING]]
|
||||
});
|
||||
|
||||
commands.add(["hi[ghlight]"],
|
||||
@@ -915,7 +915,7 @@ function Buffer() //{{{
|
||||
argCount: 1,
|
||||
bang: true,
|
||||
hereDoc: true,
|
||||
literal: true,
|
||||
literal: true
|
||||
});
|
||||
|
||||
commands.add(["vie[wsource]"],
|
||||
|
||||
@@ -532,7 +532,7 @@ function Commands() //{{{
|
||||
invalid = true;
|
||||
}
|
||||
|
||||
if (quote)
|
||||
if (quote)
|
||||
{
|
||||
if (!complete)
|
||||
{
|
||||
@@ -748,7 +748,7 @@ function Commands() //{{{
|
||||
let filter = {
|
||||
argCount: args["-nargs"],
|
||||
bang: "-bang" in args && true,
|
||||
count: args["-count"],
|
||||
count: args["-count"]
|
||||
};
|
||||
let cmds = getMatchingUserCommands(cmd, filter);
|
||||
|
||||
|
||||
@@ -866,12 +866,17 @@ function Completion() //{{{
|
||||
return mapped;
|
||||
};
|
||||
|
||||
try {
|
||||
if (tail)
|
||||
return [dir.length, this.cached("file-" + dir, compl, generate, "filter", [true])];
|
||||
else
|
||||
return [0, this.cached("file", filter, generate, "filter", [true])];
|
||||
}catch(e){liberator.dump(e)}
|
||||
try
|
||||
{
|
||||
if (tail)
|
||||
return [dir.length, this.cached("file-" + dir, compl, generate, "filter", [true])];
|
||||
else
|
||||
return [0, this.cached("file", filter, generate, "filter", [true])];
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
liberator.dump(e);
|
||||
}
|
||||
},
|
||||
|
||||
help: function help(filter)
|
||||
|
||||
@@ -221,7 +221,7 @@ function Search() //{{{
|
||||
aNode.appendChild(docfrag);
|
||||
parent.insertBefore(aNode, before);
|
||||
return aNode;
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////}}}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
function load(script) {
|
||||
try
|
||||
{
|
||||
dump("liberator: Loading script: " + script + "\n");
|
||||
dump("liberator: Loading script: " + script + "\n");
|
||||
loader.loadSubScript(BASE + script, modules)
|
||||
}
|
||||
catch (e)
|
||||
|
||||
@@ -101,7 +101,7 @@ const liberator = (function () //{{{
|
||||
["b", "Bookmark bar"]
|
||||
].concat(!liberator.has("tabs") ? [] : tabopts);
|
||||
},
|
||||
validator: function (value) Array.every(value, function (c) c in config.guioptions || tabopts.some(function (a) a[0] == c)),
|
||||
validator: function (value) Array.every(value, function (c) c in config.guioptions || tabopts.some(function (a) a[0] == c))
|
||||
});
|
||||
|
||||
options.add(["helpfile", "hf"],
|
||||
@@ -333,7 +333,7 @@ const liberator = (function () //{{{
|
||||
{
|
||||
bang: true,
|
||||
completer: function (filter) completion.javascript(filter),
|
||||
hereDoc: true,
|
||||
hereDoc: true
|
||||
});
|
||||
|
||||
commands.add(["loadplugins", "lpl"],
|
||||
|
||||
@@ -380,7 +380,7 @@ function Options() //{{{
|
||||
},
|
||||
{
|
||||
argCount: "0",
|
||||
bang: true,
|
||||
bang: true
|
||||
});
|
||||
|
||||
commands.add(["setl[ocal]"],
|
||||
@@ -419,6 +419,7 @@ function Options() //{{{
|
||||
function parseOpt(args, modifiers)
|
||||
{
|
||||
let ret = {};
|
||||
let matches, prefix, postfix, valueGiven;
|
||||
|
||||
[matches, prefix, ret.name, postfix, valueGiven, ret.operator, ret.value] =
|
||||
args.match(/^\s*(no|inv)?([a-z_]+)([?&!])?\s*(([-+^]?)=(.*))?\s*$/) || [];
|
||||
@@ -893,7 +894,7 @@ function Options() //{{{
|
||||
name: opt.name,
|
||||
default: opt.defaultValue,
|
||||
pre: "\u00a0\u00a0", /* Unicode nonbreaking space. */
|
||||
value: <></>,
|
||||
value: <></>
|
||||
};
|
||||
|
||||
if (onlyNonDefault && option.isDefault)
|
||||
@@ -942,7 +943,7 @@ function Options() //{{{
|
||||
default: loadPreference(pref, null, true),
|
||||
value: <>={template.highlight(value)}</>,
|
||||
name: pref,
|
||||
pre: "\u00a0\u00a0", /* Unicode nonbreaking space. */
|
||||
pre: "\u00a0\u00a0" /* Unicode nonbreaking space. */
|
||||
};
|
||||
|
||||
yield option;
|
||||
|
||||
@@ -231,6 +231,6 @@ const template = {
|
||||
</tr>)
|
||||
}
|
||||
</table>);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1493,7 +1493,7 @@ function StatusLine() //{{{
|
||||
const highlightGroup = {
|
||||
secure: "StatusLineSecure",
|
||||
broken: "StatusLineBroken",
|
||||
insecure: "StatusLine",
|
||||
insecure: "StatusLine"
|
||||
};
|
||||
|
||||
statusBar.setAttribute("class", "chromeclass-status hl-" + highlightGroup[type]);
|
||||
|
||||
@@ -436,7 +436,7 @@ const util = { //{{{
|
||||
domnode.appendChild(arguments.callee(child, doc));
|
||||
return domnode;
|
||||
}
|
||||
},
|
||||
}
|
||||
}; //}}}
|
||||
|
||||
function Struct()
|
||||
@@ -466,7 +466,7 @@ function Struct()
|
||||
}
|
||||
|
||||
Struct.prototype = {
|
||||
clone: function ()
|
||||
clone: function ()
|
||||
{
|
||||
return this.constructor.apply(null, this.slice());
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user