1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 06:07: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) {
if (iid.equals(Ci.nsISecurityCheckedComponent))
throw Components.results.NS_ERROR_NO_INTERFACE;
return this
return this;
},
getHelperForLanguage: function () null,
getInterfaces: function (count) {

View File

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

View File

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

View File

@@ -435,7 +435,7 @@ const Buffer = Module("buffer", {
})(win || window.content);
if (focusedFirst)
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;
},
@@ -1357,7 +1357,7 @@ const Buffer = Module("buffer", {
return;
if (/^>>/.test(context.filter))
context.advance(/^>>\s*/.exec(context.filter)[0].length);
return completion.file(context)
return completion.file(context);
},
literal: 0
});
@@ -1710,7 +1710,7 @@ const Buffer = Module("buffer", {
mappings.add(myModes, ["zz"],
"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 });
mappings.add(myModes, ["ZI", "zI"],
@@ -1735,7 +1735,7 @@ const Buffer = Module("buffer", {
mappings.add(myModes, ["zZ"],
"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 });
// page info

View File

@@ -100,7 +100,7 @@ const CommandWidgets = Class("CommandWidgets", {
get: function () {
let elem = self.getGroup(obj.name, obj.value)[obj.name];
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;
},
set: function (val) {
@@ -1181,7 +1181,7 @@ const CommandLine = Module("commandline", {
dactyl.registerObserver("echoLine", observe, true);
dactyl.registerObserver("echoMultiline", observe, true);
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)));
return buffer.join("\n");

View File

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

View File

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

View File

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

View File

@@ -830,7 +830,7 @@ const Events = Module("events", {
stop = true;
else if (modes.main == modes.PASS_THROUGH)
// 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)
else if (modes.main == modes.QUOTE) {
stop = !shouldPass() && (modes.getStack(1).main !== modes.PASS_THROUGH || isEscape(key));

View File

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

View File

@@ -1139,7 +1139,7 @@ const Hints = Module("hints", {
validator: function (value) {
let values = events.fromString(value).map(events.closure.toString);
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):.*? -> /, "");
if (e.fileName == uri.spec)
e.fileName = filename;
e.echoerr = <>{e.fileName}:{e.lineNumber}: {e}</>
e.echoerr = <>{e.fileName}:{e.lineNumber}: {e}</>;
}
catch (e) {}
throw e;

View File

@@ -197,7 +197,7 @@ const Modes = Module("modes", {
},
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) {
if (!(id in this.boundProperties))
@@ -340,7 +340,7 @@ const Modes = Module("modes", {
return val === undefined ? value : val;
},
set: function (val) {
modes.save(id, this, prop)
modes.save(id, this, prop);
if (desc.set)
value = desc.set.call(this, val);
value = !desc.set || value === undefined ? val : value;

View File

@@ -61,7 +61,7 @@ const Option = Class("Option", {
if (arguments.length > 3) {
if (this.type == "string")
defaultValue = Commands.quote(defaultValue);
this.defaultValue = this.parse(defaultValue)
this.defaultValue = this.parse(defaultValue);
}
// add no{option} variant of boolean {option} to this.names
@@ -434,7 +434,7 @@ const Option = Class("Option", {
stringmap: function (value) array.toObject(
Option.splitList(value, true).map(function (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)
@@ -667,7 +667,7 @@ const Options = Module("options", {
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)),
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)),
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)),
@@ -1192,7 +1192,7 @@ const Options = Module("options", {
context.filter = Option.dequote(context.filter);
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
// that it's worth breaking compatibility.
if (isArray(newValues)) {

View File

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

View File

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

View File

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

View File

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