mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 19:07:58 +01:00
merge those pesky missing semicolons
This commit is contained in:
@@ -113,10 +113,14 @@ vimperator.Command.prototype.hasName = function(name)
|
||||
for (var i = 0; i < this.specs.length; i++)
|
||||
{
|
||||
if (this.specs[i] == name) // literal command name
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (this.specs[i].match(/^(\w+|!)\[\w+\]$/)) // abbreviation spec
|
||||
{
|
||||
if (matchAbbreviation(name, this.specs[i]))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -413,7 +417,7 @@ vimperator.Commands = function() //{{{
|
||||
if (special && args)
|
||||
{
|
||||
vimperator.echoerr("E474: Invalid argument");
|
||||
return
|
||||
return;
|
||||
}
|
||||
var matches;
|
||||
if (matches = args.match(/(?:(?:^|[^a-zA-Z0-9])-|-(?:$|[^a-zA-Z0-9])|[^a-zA-Z0-9 -]).*/))
|
||||
@@ -467,7 +471,7 @@ vimperator.Commands = function() //{{{
|
||||
if (special && args)
|
||||
{
|
||||
vimperator.echoerr("E474: Invalid argument");
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
if (special)
|
||||
@@ -788,7 +792,7 @@ vimperator.Commands = function() //{{{
|
||||
return;
|
||||
}
|
||||
|
||||
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/)
|
||||
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/);
|
||||
var [lhs, rhs] = [matches[1], matches[2]];
|
||||
var leader_reg = /<Leader>/i;
|
||||
|
||||
@@ -874,7 +878,7 @@ vimperator.Commands = function() //{{{
|
||||
}
|
||||
|
||||
var filter = args.replace(/[^a-zA-Z]/g, '');
|
||||
vimperator.marks.list(filter)
|
||||
vimperator.marks.list(filter);
|
||||
},
|
||||
{
|
||||
usage: ["marks [arg]"],
|
||||
@@ -884,20 +888,20 @@ vimperator.Commands = function() //{{{
|
||||
));
|
||||
addDefaultCommand(new vimperator.Command(["mkv[imperatorrc]"],
|
||||
function(args, special)
|
||||
{
|
||||
{
|
||||
var filename;
|
||||
|
||||
|
||||
// TODO: "E172: Only one file name allowed"
|
||||
if (args)
|
||||
filename = args;
|
||||
else
|
||||
filename = vimperator.io.expandPath(navigator.platform == "Win32" ? "~/_vimperatorrc" : "~/.vimperatorrc");
|
||||
|
||||
|
||||
var file = vimperator.io.getFile(filename);
|
||||
if (file.exists() && !special)
|
||||
{
|
||||
vimperator.echoerr("E189: \".vimperatorrc\" exists (add ! to override)");
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
var line = "\" " + vimperator.version + "\n";
|
||||
@@ -910,7 +914,7 @@ vimperator.Commands = function() //{{{
|
||||
}
|
||||
|
||||
for (var option in vimperator.options)
|
||||
{
|
||||
{
|
||||
// TODO: options should be queried for this info
|
||||
// TODO: string/list options might need escaping in future
|
||||
if (!/fullscreen|usermode/.test(option.name) && option.value != option.default_value)
|
||||
@@ -926,7 +930,7 @@ vimperator.Commands = function() //{{{
|
||||
|
||||
vimperator.io.writeFile(file, line);
|
||||
},
|
||||
{
|
||||
{
|
||||
usage: ["mkv[imperatorrc] [file]"],
|
||||
short_help: "Write current keymappings and changed options to [file]",
|
||||
help: "If no <code class=\"argument\">[file]</code> is specified then ~/.vimperatorrc is written unless this file already exists. " +
|
||||
@@ -1207,7 +1211,7 @@ vimperator.Commands = function() //{{{
|
||||
var only_non_default = false; //used for :set to print non-default options
|
||||
if (!args)
|
||||
{
|
||||
args = "all?"
|
||||
args = "all?";
|
||||
only_non_default = true;
|
||||
}
|
||||
|
||||
@@ -1389,14 +1393,14 @@ vimperator.Commands = function() //{{{
|
||||
// do nothing if the requested sidebar is already open
|
||||
if (document.getElementById("sidebar-title").value == args)
|
||||
return;
|
||||
|
||||
var menu = document.getElementById("viewSidebarMenu")
|
||||
|
||||
var menu = document.getElementById("viewSidebarMenu");
|
||||
|
||||
for (var i = 0; i < menu.childNodes.length; i++)
|
||||
{
|
||||
if (menu.childNodes[i].label == args)
|
||||
{
|
||||
eval(menu.childNodes[i].getAttribute('oncommand'))
|
||||
eval(menu.childNodes[i].getAttribute('oncommand'));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1557,11 +1561,15 @@ vimperator.Commands = function() //{{{
|
||||
var before_time = Date.now();
|
||||
|
||||
if (args && args[0] == ":")
|
||||
{
|
||||
while (i--)
|
||||
vimperator.execute(args);
|
||||
}
|
||||
else
|
||||
{
|
||||
while (i--)
|
||||
eval(args);
|
||||
}
|
||||
|
||||
if (special)
|
||||
return;
|
||||
@@ -1700,7 +1708,7 @@ vimperator.Commands = function() //{{{
|
||||
short_help: "Undo closing of all closed tabs",
|
||||
help: "Firefox stores up to 10 closed tabs, even after a browser restart."
|
||||
}
|
||||
)),
|
||||
));
|
||||
addDefaultCommand(new vimperator.Command(["unl[et]"],
|
||||
function(args, special)
|
||||
{
|
||||
@@ -1780,7 +1788,7 @@ vimperator.Commands = function() //{{{
|
||||
},
|
||||
{
|
||||
usage: ["winc[ose] [url] [, url]"],
|
||||
short_help: "Close window",
|
||||
short_help: "Close window"
|
||||
}
|
||||
));
|
||||
addDefaultCommand(new vimperator.Command(["wino[pen]", "wo[pen]", "wine[dit]"],
|
||||
@@ -1862,7 +1870,7 @@ vimperator.Commands = function() //{{{
|
||||
args = args.replace(/(^|[^\\])!/g, "$1" + last_run_command);
|
||||
last_run_command = args;
|
||||
|
||||
var output = vimperator.system(args)
|
||||
var output = vimperator.system(args);
|
||||
if (output)
|
||||
vimperator.echo(vimperator.util.escapeHTML(output));
|
||||
},
|
||||
@@ -1910,7 +1918,7 @@ String.prototype.toURLArray = function() // {{{
|
||||
{
|
||||
var location = window.content.document.location;
|
||||
var tail = matches[1] ? matches[1] : "";
|
||||
urls[url] = location.protocol + "//" + location.host + "/" + tail
|
||||
urls[url] = location.protocol + "//" + location.host + "/" + tail;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1919,7 +1927,7 @@ String.prototype.toURLArray = function() // {{{
|
||||
// or keyword bookmark
|
||||
if (/\s/.test(urls[url]) || !/[.:\/]/.test(urls[url]))
|
||||
{
|
||||
matches = urls[url].match(/^(\S+)(?:\s+(.+))?$/)
|
||||
matches = urls[url].match(/^(\S+)(?:\s+(.+))?$/);
|
||||
|
||||
var alias = matches[1];
|
||||
var text = matches[2] ? matches[2] : null;
|
||||
|
||||
Reference in New Issue
Block a user