1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 10:17:59 +01:00

Add missing semicolons.

--HG--
extra : rebase_source : 9b307f142d55c3cd89ea6010ea15f1d26b11846f
This commit is contained in:
Doug Kearns
2010-11-05 09:09:09 +11:00
parent a3c423a609
commit 903268b0e1
18 changed files with 34 additions and 33 deletions

View File

@@ -198,7 +198,7 @@ Shim.prototype = {
QueryInterface: function (iid) { QueryInterface: function (iid) {
if (iid.equals(Ci.nsISecurityCheckedComponent)) if (iid.equals(Ci.nsISecurityCheckedComponent))
throw Components.results.NS_ERROR_NO_INTERFACE; throw Components.results.NS_ERROR_NO_INTERFACE;
return this return this;
}, },
getHelperForLanguage: function () null, getHelperForLanguage: function () null,
getInterfaces: function (count) { getInterfaces: function (count) {

View File

@@ -252,7 +252,7 @@ const Abbreviations = Module("abbreviations", {
], ],
completer: function (context, args) { completer: function (context, args) {
if (args.length == 1) if (args.length == 1)
return completion.abbreviation(context, args, modes) return completion.abbreviation(context, args, modes);
else if (args["-javascript"]) else if (args["-javascript"])
return completion.javascript(context); return completion.javascript(context);
}, },

View File

@@ -18,7 +18,7 @@ const Browser = Module("browser", {
dactyl.assert(url instanceof Ci.nsIURL); dactyl.assert(url instanceof Ci.nsIURL);
while (count-- && url.path != "/") while (count-- && url.path != "/")
url.path = url.path.replace(/[^\/]+\/?$/, "") url.path = url.path.replace(/[^\/]+\/?$/, "");
dactyl.assert(url.spec != buffer.URL); dactyl.assert(url.spec != buffer.URL);
dactyl.open(url.spec); dactyl.open(url.spec);

View File

@@ -435,7 +435,7 @@ const Buffer = Module("buffer", {
})(win || window.content); })(win || window.content);
if (focusedFirst) if (focusedFirst)
return frames.filter(function (f) f === buffer.focusedFrame).concat( return frames.filter(function (f) f === buffer.focusedFrame).concat(
frames.filter(function (f) f !== buffer.focusedFrame)) frames.filter(function (f) f !== buffer.focusedFrame));
return frames; return frames;
}, },
@@ -1357,7 +1357,7 @@ const Buffer = Module("buffer", {
return; return;
if (/^>>/.test(context.filter)) if (/^>>/.test(context.filter))
context.advance(/^>>\s*/.exec(context.filter)[0].length); context.advance(/^>>\s*/.exec(context.filter)[0].length);
return completion.file(context) return completion.file(context);
}, },
literal: 0 literal: 0
}); });
@@ -1710,7 +1710,7 @@ const Buffer = Module("buffer", {
mappings.add(myModes, ["zz"], mappings.add(myModes, ["zz"],
"Set text zoom value of current web page", "Set text zoom value of current web page",
function (count) { Buffer.setZoom(count > 1 ? count : 100, false) }, function (count) { Buffer.setZoom(count > 1 ? count : 100, false); },
{ count: true }); { count: true });
mappings.add(myModes, ["ZI", "zI"], mappings.add(myModes, ["ZI", "zI"],
@@ -1735,7 +1735,7 @@ const Buffer = Module("buffer", {
mappings.add(myModes, ["zZ"], mappings.add(myModes, ["zZ"],
"Set full zoom value of current web page", "Set full zoom value of current web page",
function (count) { Buffer.setZoom(count > 1 ? count : 100, true) }, function (count) { Buffer.setZoom(count > 1 ? count : 100, true); },
{ count: true }); { count: true });
// page info // page info

View File

@@ -100,7 +100,7 @@ const CommandWidgets = Class("CommandWidgets", {
get: function () { get: function () {
let elem = self.getGroup(obj.name, obj.value)[obj.name]; let elem = self.getGroup(obj.name, obj.value)[obj.name];
if (obj.value != null) if (obj.value != null)
return [obj.value[0], obj.get ? obj.get.call(this, elem) : elem.value] return [obj.value[0], obj.get ? obj.get.call(this, elem) : elem.value];
return null; return null;
}, },
set: function (val) { set: function (val) {
@@ -1181,7 +1181,7 @@ const CommandLine = Module("commandline", {
dactyl.registerObserver("echoLine", observe, true); dactyl.registerObserver("echoLine", observe, true);
dactyl.registerObserver("echoMultiline", observe, true); dactyl.registerObserver("echoMultiline", observe, true);
function observe(str, highlight, dom) { function observe(str, highlight, dom) {
buffer.push(dom && !isString(str) ? util.domToString(dom) : str) buffer.push(dom && !isString(str) ? util.domToString(dom) : str);
} }
dactyl.trapErrors.apply(dactyl, [fn, self].concat(Array.slice(arguments, 2))); dactyl.trapErrors.apply(dactyl, [fn, self].concat(Array.slice(arguments, 2)));
return buffer.join("\n"); return buffer.join("\n");

View File

@@ -723,7 +723,7 @@ const Commands = Module("commands", {
let arg = /^<<(\S*)/.exec(str)[1]; let arg = /^<<(\S*)/.exec(str)[1];
let count = arg.length + 2; let count = arg.length + 2;
if (complete) if (complete)
return [count, "", ""] return [count, "", ""];
return [count, io.readHeredoc(arg), ""]; return [count, io.readHeredoc(arg), ""];
} }
let [count, arg, quote] = Commands.parseArg(str, null, keepQuotes); let [count, arg, quote] = Commands.parseArg(str, null, keepQuotes);
@@ -1381,14 +1381,14 @@ const Commands = Module("commands", {
if (arguments.length < 2) if (arguments.length < 2)
value = io.sourcing.noExecute; value = io.sourcing.noExecute;
io.sourcing.stack = io.sourcing.stack || {}; io.sourcing.stack = io.sourcing.stack || {};
io.sourcing.stack[cmd] = (io.sourcing.stack[cmd] || []).concat([value]) io.sourcing.stack[cmd] = (io.sourcing.stack[cmd] || []).concat([value]);
} }
commands.add(["if"], commands.add(["if"],
"Execute commands until the next :elseif, :else, or :endif only if the argument returns true", "Execute commands until the next :elseif, :else, or :endif only if the argument returns true",
function (args) { io.sourcing.noExecute = !dactyl.userEval(args[0]); }, function (args) { io.sourcing.noExecute = !dactyl.userEval(args[0]); },
{ {
always: function (args) { push("if") }, always: function (args) { push("if"); },
argCount: "1", argCount: "1",
literal: 0 literal: 0
}); });
@@ -1419,7 +1419,7 @@ const Commands = Module("commands", {
"Ends a string of :if/:elseif/:else conditionals", "Ends a string of :if/:elseif/:else conditionals",
function (args) {}, function (args) {},
{ {
always: function (args) { io.sourcing.noExecute = pop("if") }, always: function (args) { io.sourcing.noExecute = pop("if"); },
argCount: "0" argCount: "0"
}); });

View File

@@ -34,7 +34,7 @@ function deprecated(reason, fn) {
deprecatedMethod.seen = { "chrome://dactyl/content/javascript.js": true }; deprecatedMethod.seen = { "chrome://dactyl/content/javascript.js": true };
return callable(fn) ? deprecatedMethod : Class.Property({ return callable(fn) ? deprecatedMethod : Class.Property({
get: function () deprecatedMethod, get: function () deprecatedMethod,
init: function (prop) { name = prop } init: function (prop) { name = prop; }
}); });
} }
@@ -622,7 +622,7 @@ const Dactyl = Module("dactyl", {
if (obj instanceof Command) { if (obj instanceof Command) {
tag = spec = function (cmd) <>:{cmd}</>; tag = spec = function (cmd) <>:{cmd}</>;
link = function (cmd) <ex>:{cmd}</ex> link = function (cmd) <ex>:{cmd}</ex>;
args = obj.parseArgs("", CompletionContext(str || "")); args = obj.parseArgs("", CompletionContext(str || ""));
} }
else if (obj instanceof Map && obj.count) { else if (obj instanceof Map && obj.count) {

View File

@@ -694,7 +694,7 @@ const Editor = Module("editor", {
function (count) { function (count) {
dactyl.assert(!editor.isCaret); dactyl.assert(!editor.isCaret);
if (!count) if (!count)
count = 1 count = 1;
while (count--) while (count--)
editor.executeCommand("cmd_paste", count); editor.executeCommand("cmd_paste", count);
modes.pop(modes.TEXT_EDIT); modes.pop(modes.TEXT_EDIT);

View File

@@ -830,7 +830,7 @@ const Events = Module("events", {
stop = true; stop = true;
else if (modes.main == modes.PASS_THROUGH) else if (modes.main == modes.PASS_THROUGH)
// let flow continue to handle these keys to cancel escape-all-keys mode // let flow continue to handle these keys to cancel escape-all-keys mode
stop = !isEscape(key) && key != "<C-v>" stop = !isEscape(key) && key != "<C-v>";
// handle Escape-one-key mode (Ctrl-v) // handle Escape-one-key mode (Ctrl-v)
else if (modes.main == modes.QUOTE) { else if (modes.main == modes.QUOTE) {
stop = !shouldPass() && (modes.getStack(1).main !== modes.PASS_THROUGH || isEscape(key)); stop = !shouldPass() && (modes.getStack(1).main !== modes.PASS_THROUGH || isEscape(key));

View File

@@ -632,7 +632,7 @@ const RangeFind = Class("RangeFind", {
.QueryInterface(Ci.nsISelectionController), .QueryInterface(Ci.nsISelectionController),
get selection() { get selection() {
try { try {
return this.selectionController.getSelection(Ci.nsISelectionController.SELECTION_NORMAL) return this.selectionController.getSelection(Ci.nsISelectionController.SELECTION_NORMAL);
} }
catch (e) { catch (e) {
return null; return null;
@@ -649,10 +649,11 @@ const RangeFind = Class("RangeFind", {
}, },
equal: function (r1, r2) { equal: function (r1, r2) {
try { try {
return !r1.compareBoundaryPoints(r1.START_TO_START, r2) && !r1.compareBoundaryPoints(r1.END_TO_END, r2) return !r1.compareBoundaryPoints(r1.START_TO_START, r2) && !r1.compareBoundaryPoints(r1.END_TO_END, r2);
}
catch (e) {
return false;
} }
catch (e) {}
return false;
}, },
nodeRange: function (node) { nodeRange: function (node) {
let range = node.ownerDocument.createRange(); let range = node.ownerDocument.createRange();

View File

@@ -1139,7 +1139,7 @@ const Hints = Module("hints", {
validator: function (value) { validator: function (value) {
let values = events.fromString(value).map(events.closure.toString); let values = events.fromString(value).map(events.closure.toString);
return Option.validIf(array.uniq(values).length === values.length, return Option.validIf(array.uniq(values).length === values.length,
"Duplicate keys not allowed") "Duplicate keys not allowed");
} }
}); });

View File

@@ -353,7 +353,7 @@ lookup:
e.fileName = e.fileName.replace(/^(chrome|resource):.*? -> /, ""); e.fileName = e.fileName.replace(/^(chrome|resource):.*? -> /, "");
if (e.fileName == uri.spec) if (e.fileName == uri.spec)
e.fileName = filename; e.fileName = filename;
e.echoerr = <>{e.fileName}:{e.lineNumber}: {e}</> e.echoerr = <>{e.fileName}:{e.lineNumber}: {e}</>;
} }
catch (e) {} catch (e) {}
throw e; throw e;

View File

@@ -197,7 +197,7 @@ const Modes = Module("modes", {
}, },
delayed: [], delayed: [],
delay: function (callback, self) { this.delayed.push([callback, self]) }, delay: function (callback, self) { this.delayed.push([callback, self]); },
save: function save(id, obj, prop) { save: function save(id, obj, prop) {
if (!(id in this.boundProperties)) if (!(id in this.boundProperties))
@@ -340,7 +340,7 @@ const Modes = Module("modes", {
return val === undefined ? value : val; return val === undefined ? value : val;
}, },
set: function (val) { set: function (val) {
modes.save(id, this, prop) modes.save(id, this, prop);
if (desc.set) if (desc.set)
value = desc.set.call(this, val); value = desc.set.call(this, val);
value = !desc.set || value === undefined ? val : value; value = !desc.set || value === undefined ? val : value;

View File

@@ -61,7 +61,7 @@ const Option = Class("Option", {
if (arguments.length > 3) { if (arguments.length > 3) {
if (this.type == "string") if (this.type == "string")
defaultValue = Commands.quote(defaultValue); defaultValue = Commands.quote(defaultValue);
this.defaultValue = this.parse(defaultValue) this.defaultValue = this.parse(defaultValue);
} }
// add no{option} variant of boolean {option} to this.names // add no{option} variant of boolean {option} to this.names
@@ -434,7 +434,7 @@ const Option = Class("Option", {
stringmap: function (value) array.toObject( stringmap: function (value) array.toObject(
Option.splitList(value, true).map(function (v) { Option.splitList(value, true).map(function (v) {
let [count, key, quote] = Commands.parseArg(v, /:/); let [count, key, quote] = Commands.parseArg(v, /:/);
return [key, Option.dequote(v.substr(count + 1))] return [key, Option.dequote(v.substr(count + 1))];
})), })),
regexpmap: function (value) regexpmap: function (value)
@@ -667,7 +667,7 @@ const Options = Module("options", {
allPrefs: deprecated("Please use prefs.getNames", function allPrefs() prefs.getNames.apply(prefs, arguments)), allPrefs: deprecated("Please use prefs.getNames", function allPrefs() prefs.getNames.apply(prefs, arguments)),
getPref: deprecated("Please use prefs.get", function getPref() prefs.get.apply(prefs, arguments)), getPref: deprecated("Please use prefs.get", function getPref() prefs.get.apply(prefs, arguments)),
invertPref: deprecated("Please use prefs.invert", function invertPref() prefs.invert.apply(prefs, arguments)), invertPref: deprecated("Please use prefs.invert", function invertPref() prefs.invert.apply(prefs, arguments)),
listPrefs: deprecated("Please use prefs.list", function listPrefs() { commandline.commandOutput(prefs.list.apply(prefs, arguments)) }), listPrefs: deprecated("Please use prefs.list", function listPrefs() { commandline.commandOutput(prefs.list.apply(prefs, arguments)); }),
observePref: deprecated("Please use prefs.observe", function observePref() prefs.observe.apply(prefs, arguments)), observePref: deprecated("Please use prefs.observe", function observePref() prefs.observe.apply(prefs, arguments)),
popContext: deprecated("Please use prefs.popContext", function popContext() prefs.popContext.apply(prefs, arguments)), popContext: deprecated("Please use prefs.popContext", function popContext() prefs.popContext.apply(prefs, arguments)),
pushContext: deprecated("Please use prefs.pushContext", function pushContext() prefs.pushContext.apply(prefs, arguments)), pushContext: deprecated("Please use prefs.pushContext", function pushContext() prefs.pushContext.apply(prefs, arguments)),
@@ -1192,7 +1192,7 @@ const Options = Module("options", {
context.filter = Option.dequote(context.filter); context.filter = Option.dequote(context.filter);
context.title = ["Option Value"]; context.title = ["Option Value"];
context.quote = Commands.complQuote[Option._quote] || Commands.complQuote[""] context.quote = Commands.complQuote[Option._quote] || Commands.complQuote[""];
// Not Vim compatible, but is a significant enough improvement // Not Vim compatible, but is a significant enough improvement
// that it's worth breaking compatibility. // that it's worth breaking compatibility.
if (isArray(newValues)) { if (isArray(newValues)) {

View File

@@ -185,7 +185,7 @@ const QuickMarks = Module("quickmarks", {
completion.quickmark = function (context) { completion.quickmark = function (context) {
context.title = ["QuickMark", "URL"]; context.title = ["QuickMark", "URL"];
context.generate = function () Iterator(quickmarks._qmarks); context.generate = function () Iterator(quickmarks._qmarks);
} };
}, },
mappings: function () { mappings: function () {
var myModes = config.browserModes; var myModes = config.browserModes;

View File

@@ -37,7 +37,7 @@ const Tabs = Module("tabs", {
this.tabStyle = styles.addSheet(true, "tab-strip-hiding", config.styleableChrome, this.tabStyle = styles.addSheet(true, "tab-strip-hiding", config.styleableChrome,
(config.tabStrip.id ? "#" + config.tabStrip.id : ".tabbrowser-strip") + (config.tabStrip.id ? "#" + config.tabStrip.id : ".tabbrowser-strip") +
"{ visibility: collapse; }", "{ visibility: collapse; }",
false, true) false, true);
dactyl.commands["tabs.select"] = function (event) { dactyl.commands["tabs.select"] = function (event) {
tabs.select(event.originalTarget.getAttribute("identifier")); tabs.select(event.originalTarget.getAttribute("identifier"));

View File

@@ -60,7 +60,7 @@ const Config = Module("config", ConfigBase, {
StreamStop: "Triggered after a stream has stopped", StreamStop: "Triggered after a stream has stopped",
Enter: "Triggered after Songbird starts", Enter: "Triggered after Songbird starts",
LeavePre: "Triggered before exiting Songbird, just before destroying each module", LeavePre: "Triggered before exiting Songbird, just before destroying each module",
Leave: "Triggered before exiting Songbird", Leave: "Triggered before exiting Songbird"
}, },
dialogs: { dialogs: {

View File

@@ -18,7 +18,7 @@ const Config = Module("config", ConfigBase, {
PageLoad: "Triggered when a page gets (re)loaded/opened", PageLoad: "Triggered when a page gets (re)loaded/opened",
Enter: "Triggered after Thunderbird starts", Enter: "Triggered after Thunderbird starts",
Leave: "Triggered before exiting Thunderbird", Leave: "Triggered before exiting Thunderbird",
LeavePre: "Triggered before exiting Thunderbird", LeavePre: "Triggered before exiting Thunderbird"
}, },
get browser() getBrowser(), get browser() getBrowser(),