1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 19:37:59 +01:00

merge those pesky missing semicolons

This commit is contained in:
Doug Kearns
2007-11-01 09:56:33 +00:00
parent 9f46180257
commit 14e4cf2f56
14 changed files with 86 additions and 78 deletions

View File

@@ -113,11 +113,15 @@ vimperator.Command.prototype.hasName = function(name)
for (var i = 0; i < this.specs.length; i++) for (var i = 0; i < this.specs.length; i++)
{ {
if (this.specs[i] == name) // literal command name if (this.specs[i] == name) // literal command name
{
return true; return true;
}
else if (this.specs[i].match(/^(\w+|!)\[\w+\]$/)) // abbreviation spec else if (this.specs[i].match(/^(\w+|!)\[\w+\]$/)) // abbreviation spec
{
if (matchAbbreviation(name, this.specs[i])) if (matchAbbreviation(name, this.specs[i]))
return true; return true;
} }
}
return false; return false;
} }
//}}} //}}}
@@ -413,7 +417,7 @@ vimperator.Commands = function() //{{{
if (special && args) if (special && args)
{ {
vimperator.echoerr("E474: Invalid argument"); vimperator.echoerr("E474: Invalid argument");
return return;
} }
var matches; var matches;
if (matches = args.match(/(?:(?:^|[^a-zA-Z0-9])-|-(?:$|[^a-zA-Z0-9])|[^a-zA-Z0-9 -]).*/)) 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) if (special && args)
{ {
vimperator.echoerr("E474: Invalid argument"); vimperator.echoerr("E474: Invalid argument");
return return;
} }
if (special) if (special)
@@ -788,7 +792,7 @@ vimperator.Commands = function() //{{{
return; return;
} }
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/) var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/);
var [lhs, rhs] = [matches[1], matches[2]]; var [lhs, rhs] = [matches[1], matches[2]];
var leader_reg = /<Leader>/i; var leader_reg = /<Leader>/i;
@@ -874,7 +878,7 @@ vimperator.Commands = function() //{{{
} }
var filter = args.replace(/[^a-zA-Z]/g, ''); var filter = args.replace(/[^a-zA-Z]/g, '');
vimperator.marks.list(filter) vimperator.marks.list(filter);
}, },
{ {
usage: ["marks [arg]"], usage: ["marks [arg]"],
@@ -897,7 +901,7 @@ vimperator.Commands = function() //{{{
if (file.exists() && !special) if (file.exists() && !special)
{ {
vimperator.echoerr("E189: \".vimperatorrc\" exists (add ! to override)"); vimperator.echoerr("E189: \".vimperatorrc\" exists (add ! to override)");
return return;
} }
var line = "\" " + vimperator.version + "\n"; var line = "\" " + vimperator.version + "\n";
@@ -1207,7 +1211,7 @@ vimperator.Commands = function() //{{{
var only_non_default = false; //used for :set to print non-default options var only_non_default = false; //used for :set to print non-default options
if (!args) if (!args)
{ {
args = "all?" args = "all?";
only_non_default = true; only_non_default = true;
} }
@@ -1390,13 +1394,13 @@ vimperator.Commands = function() //{{{
if (document.getElementById("sidebar-title").value == args) if (document.getElementById("sidebar-title").value == args)
return; return;
var menu = document.getElementById("viewSidebarMenu") var menu = document.getElementById("viewSidebarMenu");
for (var i = 0; i < menu.childNodes.length; i++) for (var i = 0; i < menu.childNodes.length; i++)
{ {
if (menu.childNodes[i].label == args) if (menu.childNodes[i].label == args)
{ {
eval(menu.childNodes[i].getAttribute('oncommand')) eval(menu.childNodes[i].getAttribute('oncommand'));
break; break;
} }
} }
@@ -1557,11 +1561,15 @@ vimperator.Commands = function() //{{{
var before_time = Date.now(); var before_time = Date.now();
if (args && args[0] == ":") if (args && args[0] == ":")
{
while (i--) while (i--)
vimperator.execute(args); vimperator.execute(args);
}
else else
{
while (i--) while (i--)
eval(args); eval(args);
}
if (special) if (special)
return; return;
@@ -1700,7 +1708,7 @@ vimperator.Commands = function() //{{{
short_help: "Undo closing of all closed tabs", short_help: "Undo closing of all closed tabs",
help: "Firefox stores up to 10 closed tabs, even after a browser restart." help: "Firefox stores up to 10 closed tabs, even after a browser restart."
} }
)), ));
addDefaultCommand(new vimperator.Command(["unl[et]"], addDefaultCommand(new vimperator.Command(["unl[et]"],
function(args, special) function(args, special)
{ {
@@ -1780,7 +1788,7 @@ vimperator.Commands = function() //{{{
}, },
{ {
usage: ["winc[ose] [url] [, url]"], usage: ["winc[ose] [url] [, url]"],
short_help: "Close window", short_help: "Close window"
} }
)); ));
addDefaultCommand(new vimperator.Command(["wino[pen]", "wo[pen]", "wine[dit]"], 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); args = args.replace(/(^|[^\\])!/g, "$1" + last_run_command);
last_run_command = args; last_run_command = args;
var output = vimperator.system(args) var output = vimperator.system(args);
if (output) if (output)
vimperator.echo(vimperator.util.escapeHTML(output)); vimperator.echo(vimperator.util.escapeHTML(output));
}, },
@@ -1910,7 +1918,7 @@ String.prototype.toURLArray = function() // {{{
{ {
var location = window.content.document.location; var location = window.content.document.location;
var tail = matches[1] ? matches[1] : ""; var tail = matches[1] ? matches[1] : "";
urls[url] = location.protocol + "//" + location.host + "/" + tail urls[url] = location.protocol + "//" + location.host + "/" + tail;
continue; continue;
} }
@@ -1919,7 +1927,7 @@ String.prototype.toURLArray = function() // {{{
// or keyword bookmark // or keyword bookmark
if (/\s/.test(urls[url]) || !/[.:\/]/.test(urls[url])) 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 alias = matches[1];
var text = matches[2] ? matches[2] : null; var text = matches[2] ? matches[2] : null;

View File

@@ -278,12 +278,7 @@ vimperator.Completion = function() // {{{
[["options"], "Configuration options"]]; // TODO: hardcoded until we have proper 'pages' [["options"], "Configuration options"]]; // TODO: hardcoded until we have proper 'pages'
g_substrings = []; g_substrings = [];
for (var command in vimperator.commands) for (var command in vimperator.commands)
{ help_array.push([command.long_names.map(function($_) { return ":" + $_; }), command.short_help]);
help_array.push([command.long_names.map(function($_) {
return ":" + $_;
}),
command.short_help])
}
options = this.get_options_completions(filter, true); options = this.get_options_completions(filter, true);
help_array = help_array.concat(options.map(function($_) { help_array = help_array.concat(options.map(function($_) {
return [ return [
@@ -292,7 +287,7 @@ vimperator.Completion = function() // {{{
]; ];
})); }));
for (var map in vimperator.mappings) for (var map in vimperator.mappings)
help_array.push([map.names, map.short_help]) help_array.push([map.names, map.short_help]);
if (!filter) return help_array.map(function($_) { if (!filter) return help_array.map(function($_) {
return [$_[0][0], $_[1]]; // unfiltered, use the first command return [$_[0][0], $_[1]]; // unfiltered, use the first command
@@ -304,7 +299,7 @@ vimperator.Completion = function() // {{{
get_command_completions: function(filter) //{{{ get_command_completions: function(filter) //{{{
{ {
g_substrings = []; g_substrings = [];
var completions = [] var completions = [];
if (!filter) if (!filter)
{ {
for (var command in vimperator.commands) for (var command in vimperator.commands)
@@ -333,7 +328,7 @@ vimperator.Completion = function() // {{{
{ {
if (prefix && option.type != "boolean") if (prefix && option.type != "boolean")
continue; continue;
options.push([option.names, option.short_help]) options.push([option.names, option.short_help]);
} }
return options; return options;
} }
@@ -345,7 +340,7 @@ vimperator.Completion = function() // {{{
{ {
if (prefix && option.type != "boolean") if (prefix && option.type != "boolean")
continue; continue;
options.push([prefix + option.name, option.short_help]) options.push([prefix + option.name, option.short_help]);
} }
return options; return options;
} }
@@ -513,7 +508,11 @@ vimperator.Completion = function() // {{{
" else {" + " else {" +
" comp.push([[i], type]); }" + " comp.push([[i], type]); }" +
"} comp;"); "} comp;");
} catch (e) { completions = []; }; }
catch (e)
{
completions = [];
}
return build_longest_starting_substring(completions, filter); return build_longest_starting_substring(completions, filter);
}, // }}} }, // }}}

View File

@@ -40,7 +40,7 @@ vimperator.Events = function() //{{{
// any tab related events // any tab related events
var tabcontainer = getBrowser().tabContainer; var tabcontainer = getBrowser().tabContainer;
tabcontainer.addEventListener("TabMove", function(event) { tabcontainer.addEventListener("TabMove", function(event) {
vimperator.statusline.updateTabCount() vimperator.statusline.updateTabCount();
vimperator.buffer.updateBufferList(); vimperator.buffer.updateBufferList();
}, false); }, false);
tabcontainer.addEventListener("TabOpen", function(event) { tabcontainer.addEventListener("TabOpen", function(event) {
@@ -48,7 +48,7 @@ vimperator.Events = function() //{{{
vimperator.buffer.updateBufferList(); vimperator.buffer.updateBufferList();
}, false); }, false);
tabcontainer.addEventListener("TabClose", function(event) { tabcontainer.addEventListener("TabClose", function(event) {
vimperator.statusline.updateTabCount() vimperator.statusline.updateTabCount();
vimperator.buffer.updateBufferList(); vimperator.buffer.updateBufferList();
}, false); }, false);
tabcontainer.addEventListener("TabSelect", function(event) { tabcontainer.addEventListener("TabSelect", function(event) {
@@ -152,7 +152,7 @@ vimperator.Events = function() //{{{
[ KeyEvent.DOM_VK_F21, ["F21"] ], [ KeyEvent.DOM_VK_F21, ["F21"] ],
[ KeyEvent.DOM_VK_F22, ["F22"] ], [ KeyEvent.DOM_VK_F22, ["F22"] ],
[ KeyEvent.DOM_VK_F23, ["F23"] ], [ KeyEvent.DOM_VK_F23, ["F23"] ],
[ KeyEvent.DOM_VK_F24, ["F24"] ], [ KeyEvent.DOM_VK_F24, ["F24"] ]
]; ];
function getKeyCode(str) function getKeyCode(str)
@@ -372,13 +372,13 @@ vimperator.Events = function() //{{{
switch (event.button) switch (event.button)
{ {
case 0: case 0:
key = "LeftMouse" key = "LeftMouse";
break; break;
case 1: case 1:
key = "MiddleMouse" key = "MiddleMouse";
break; break;
case 2: case 2:
key = "RightMouse" key = "RightMouse";
break; break;
} }
} }

View File

@@ -81,7 +81,7 @@ vimperator.Search = function() //{{{
links_only = false; links_only = false;
// strip links-only modifiers // strip links-only modifiers
pattern = pattern.replace(/(\\)?\\[uU]/g, function($0, $1) { return $1 ? $0 : "" }); pattern = pattern.replace(/(\\)?\\[uU]/g, function($0, $1) { return $1 ? $0 : ""; });
// case sensitivity - \c wins if both modifiers specified // case sensitivity - \c wins if both modifiers specified
if (/\c/.test(pattern)) if (/\c/.test(pattern))
@@ -96,10 +96,10 @@ vimperator.Search = function() //{{{
case_sensitive = true; case_sensitive = true;
// strip case-sensitive modifiers // strip case-sensitive modifiers
pattern = pattern.replace(/(\\)?\\[cC]/g, function($0, $1) { return $1 ? $0 : "" }); pattern = pattern.replace(/(\\)?\\[cC]/g, function($0, $1) { return $1 ? $0 : ""; });
// remove any modifer escape \ // remove any modifer escape \
pattern = pattern.replace(/\\(\\[cCuU])/g, '$1') pattern = pattern.replace(/\\(\\[cCuU])/g, '$1');
search_string = pattern; search_string = pattern;
} }
@@ -246,8 +246,8 @@ vimperator.Search = function() //{{{
(function(win) (function(win)
{ {
for (var i = 0; i < win.frames.length; i++) for (var i = 0; i < win.frames.length; i++)
arguments.callee(win.frames[i]) arguments.callee(win.frames[i]);
var spans = vimperator.buffer.evaluateXPath('//span[@id="__firefox-findbar-search-id"]', win.document) var spans = vimperator.buffer.evaluateXPath('//span[@id="__firefox-findbar-search-id"]', win.document);
for (var i = 0; i < spans.snapshotLength; i++) for (var i = 0; i < spans.snapshotLength; i++)
spans.snapshotItem(i).setAttribute("style", vimperator.options["hlsearchstyle"]); spans.snapshotItem(i).setAttribute("style", vimperator.options["hlsearchstyle"]);
})(window.content); })(window.content);

View File

@@ -155,7 +155,7 @@ vimperator.help = function(section, easter) //{{{
'<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBDDJfc+lXLBSAM9XSWv/ebzG/L7PTqYiIXaWVg8pfinDsfYaAcifcgCTuApg4v/VaZIQ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bGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA3MDMyMTIyMzI1OFowIwYJKoZIhvcNAQkEMRYEFCirrvlwYVHQiNEEbM6ikfx9+Dm5MA0GCSqGSIb3DQEBAQUABIGAtbsR8GdCdURLziozXLSdtY+zJZUPPeQFXXy2V1S/3ldiN+pRvd4HI7xz8mOY1UaKJZpwZnOosy9MflL1/hbiEtEyQ2Dm/s4jnTcJng/NjLIZu+0NYxXRJhB+zMJubnMMMjzNrGlqI4F2HAB/bCA1eOJ5B83Of3dA4rk/T/8GoSQ=-----END PKCS7-----"/>' +
'</fieldset></form>' + '</fieldset></form>' +
'<p>Of course as a believer in free open source software, only make a donation if you really like Vimperator and the money doesn\'t hurt - otherwise just use it, recommend it and like it :)</p>' '<p>Of course as a believer in free open source software, only make a donation if you really like Vimperator and the money doesn\'t hurt - otherwise just use it, recommend it and like it :)</p>';
var initialization = '<span style="float: right"><code class="tag">initialization</code></span><h2 id="initialization">Initialization</h2>' + var initialization = '<span style="float: right"><code class="tag">initialization</code></span><h2 id="initialization">Initialization</h2>' +
'<p>At startup Vimperator sources a user RC file, containing Ex commands, and any JavaScript files found in the plugin directory.</p>' + '<p>At startup Vimperator sources a user RC file, containing Ex commands, and any JavaScript files found in the plugin directory.</p>' +
@@ -178,7 +178,7 @@ vimperator.help = function(section, easter) //{{{
var mappings = '<span style="float: right"><code class="tag">mappings</code></span><h2 id="mappings">Mappings</h2>' + var mappings = '<span style="float: right"><code class="tag">mappings</code></span><h2 id="mappings">Mappings</h2>' +
'<p>The denotion of modifier keys is like in Vim, so C- means the Control key, M- the Meta key, A- the Alt key and S- the Shift key.</p>'+ '<p>The denotion of modifier keys is like in Vim, so C- means the Control key, M- the Meta key, A- the Alt key and S- the Shift key.</p>'+
'<table class="vimperator mappings">' '<table class="vimperator mappings">';
mappings += makeHelpString(vimperator.mappings, "", "", null); mappings += makeHelpString(vimperator.mappings, "", "", null);
mappings += '</table>'; mappings += '</table>';
if (section && section == 'holy-grail') if (section && section == 'holy-grail')

View File

@@ -412,7 +412,7 @@ vimperator.Hints = function() //{{{
showHints(null, 0); showHints(null, 0);
return true; return true;
}; }
/** /**
* Disables the HaH-mode by hiding the hints and disabling the input mode * Disables the HaH-mode by hiding the hints and disabling the input mode

View File

@@ -143,7 +143,7 @@ vimperator.Mappings = function() //{{{
{ {
if (names[j] == cmd) if (names[j] == cmd)
{ {
names.splice(j, 1) names.splice(j, 1);
if (names.length == 0) if (names.length == 0)
maps.splice(i, 1); maps.splice(i, 1);
@@ -260,7 +260,7 @@ vimperator.Mappings = function() //{{{
for (var j = 0; j < map.names.length; j++) for (var j = 0; j < map.names.length; j++)
{ {
if (map.names[j].indexOf(cmd) == 0) if (map.names[j].indexOf(cmd) == 0)
matches.push(map) matches.push(map);
} }
} }
@@ -284,7 +284,7 @@ vimperator.Mappings = function() //{{{
for (var j = 0; j < maps[i].names.length; j++) for (var j = 0; j < maps[i].names.length; j++)
{ {
list += "<tr>"; list += "<tr>";
list += "<td> " + vimperator.util.escapeHTML(maps[i].names[j]) + "</td>" list += "<td> " + vimperator.util.escapeHTML(maps[i].names[j]) + "</td>";
if (maps[i].rhs) if (maps[i].rhs)
list += "<td> " + vimperator.util.escapeHTML(maps[i].rhs) + "</td>" list += "<td> " + vimperator.util.escapeHTML(maps[i].rhs) + "</td>"
list += "</tr>"; list += "</tr>";
@@ -446,7 +446,7 @@ vimperator.Mappings = function() //{{{
} }
)); ));
addDefaultMap(new vimperator.Map(vimperator.modes.NORMAL, ["go"], addDefaultMap(new vimperator.Map(vimperator.modes.NORMAL, ["go"],
function(arg) { vimperator.quickmarks.jumpTo(arg, vimperator.CURRENT_TAB) }, function(arg) { vimperator.quickmarks.jumpTo(arg, vimperator.CURRENT_TAB); },
{ {
short_help: "Jump to a QuickMark in the current tab", short_help: "Jump to a QuickMark in the current tab",
usage: ["go{a-zA-Z0-9}"], usage: ["go{a-zA-Z0-9}"],
@@ -516,7 +516,7 @@ vimperator.Mappings = function() //{{{
// should probably reopen the closed tab when a 'deleted' // should probably reopen the closed tab when a 'deleted'
// alternate is selected // alternate is selected
if (index == -1) if (index == -1)
vimperator.echoerr("E86: Buffer does not exist") // TODO: This should read "Buffer N does not exist" vimperator.echoerr("E86: Buffer does not exist"); // TODO: This should read "Buffer N does not exist"
else else
vimperator.tabs.select(index); vimperator.tabs.select(index);
}, },
@@ -535,7 +535,7 @@ vimperator.Mappings = function() //{{{
return; return;
} }
vimperator.marks.add(arg) vimperator.marks.add(arg);
}, },
{ {
short_help: "Set mark at the cursor position", short_help: "Set mark at the cursor position",
@@ -545,7 +545,7 @@ vimperator.Mappings = function() //{{{
} }
)); ));
addDefaultMap(new vimperator.Map(vimperator.modes.NORMAL, ["'", "`"], addDefaultMap(new vimperator.Map(vimperator.modes.NORMAL, ["'", "`"],
function(arg) { vimperator.marks.jumpTo(arg) }, function(arg) { vimperator.marks.jumpTo(arg); },
{ {
short_help: "Jump to the mark in the current buffer", short_help: "Jump to the mark in the current buffer",
usage: ["'{a-zA-Z}"], usage: ["'{a-zA-Z}"],
@@ -562,7 +562,7 @@ vimperator.Mappings = function() //{{{
return; return;
} }
vimperator.quickmarks.add(arg, vimperator.buffer.URL) vimperator.quickmarks.add(arg, vimperator.buffer.URL);
}, },
{ {
short_help: "Add new QuickMark for current URL", short_help: "Add new QuickMark for current URL",

View File

@@ -256,7 +256,8 @@ vimperator.Tabs = function() //{{{
{ {
this.reload(getBrowser().mTabs[i], bypass_cache) this.reload(getBrowser().mTabs[i], bypass_cache)
} }
catch (e) { catch (e)
{
// FIXME: can we do anything useful here without stopping the // FIXME: can we do anything useful here without stopping the
// other tabs from reloading? // other tabs from reloading?
} }

View File

@@ -93,7 +93,7 @@ vimperator.CommandLine = function() //{{{
// for the example command "open sometext| othertext" (| is the cursor pos): // for the example command "open sometext| othertext" (| is the cursor pos):
var completion_start_index = 0; // will be 5 because we want to complete arguments for the :open command var completion_start_index = 0; // will be 5 because we want to complete arguments for the :open command
var completion_prefix = "" // will be: "open sometext" var completion_prefix = ""; // will be: "open sometext"
var completion_postfix = ""; // will be: " othertext" var completion_postfix = ""; // will be: " othertext"
var wild_index = 0; // keep track how often we press <Tab> in a row var wild_index = 0; // keep track how often we press <Tab> in a row
@@ -682,7 +682,7 @@ vimperator.CommandLine = function() //{{{
if (vimperator.options["more"] && isScrollable() && !atEnd()) if (vimperator.options["more"] && isScrollable() && !atEnd())
win.scrollByLines(1); win.scrollByLines(1);
else else
close_window = true;; // don't propagate the event for accept keys close_window = true; // don't propagate the event for accept keys
break; break;
// up a line // up a line
@@ -807,7 +807,7 @@ vimperator.CommandLine = function() //{{{
// close the window // close the window
case "q": case "q":
close_window = true;; close_window = true;
break; break;
// unmapped key // unmapped key

View File

@@ -456,7 +456,7 @@ const vimperator = (function() //{{{
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator); .getService(Components.interfaces.nsIWindowMediator);
whichwindow = wm.getMostRecentWindow("navigator:browser"); whichwindow = wm.getMostRecentWindow("navigator:browser");
whichwindow.loadURI(url, null, postdata) whichwindow.loadURI(url, null, postdata);
break; break;
default: default: