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

Add missing semicolons.

...let the good times roll.
This commit is contained in:
Doug Kearns
2010-09-22 23:44:04 +10:00
parent 39cbb91490
commit cce6bb653e
16 changed files with 39 additions and 39 deletions

View File

@@ -136,7 +136,7 @@ Dactyl.prototype = {
for each (let prop in ["HELP_TAGS", "FILE_MAP", "OVERLAY_MAP"]) { for each (let prop in ["HELP_TAGS", "FILE_MAP", "OVERLAY_MAP"]) {
this[prop] = this[prop].constructor(); this[prop] = this[prop].constructor();
for (let [k, v] in Iterator(obj[prop] || {})) for (let [k, v] in Iterator(obj[prop] || {}))
this[prop][k] = v this[prop][k] = v;
} }
}, },

View File

@@ -201,7 +201,7 @@ const AutoCommands = Module("autocommands", {
options: [ options: [
{ {
names: ["-javascript", "-js"], names: ["-javascript", "-js"],
description: "Interperate the action as JavaScript code rather than an ex command", description: "Interperate the action as JavaScript code rather than an ex command"
} }
] ]
}); });

View File

@@ -1071,7 +1071,7 @@ const Buffer = Module("buffer", {
else if (increment == "pages") else if (increment == "pages")
increment = elem.clientHeight - fontSize; increment = elem.clientHeight - fontSize;
else else
throw Error() throw Error();
elem.scrollTop += number * increment; elem.scrollTop += number * increment;
}, },
@@ -1083,7 +1083,7 @@ const Buffer = Module("buffer", {
else if (increment == "pages") else if (increment == "pages")
increment = elem.clientWidth - fontSize; increment = elem.clientWidth - fontSize;
else else
throw Error() throw Error();
elem.scrollLeft += number * increment; elem.scrollLeft += number * increment;
}, },

View File

@@ -119,7 +119,7 @@ const CommandLine = Module("commandline", {
message: document.getElementById("dactyl-message"), message: document.getElementById("dactyl-message"),
multilineOutput: document.getElementById("dactyl-multiline-output"), multilineOutput: document.getElementById("dactyl-multiline-output"),
multilineInput: document.getElementById("dactyl-multiline-input"), multilineInput: document.getElementById("dactyl-multiline-input")
}; };
widgets.command.inputField.QueryInterface(Ci.nsIDOMNSEditableElement); widgets.command.inputField.QueryInterface(Ci.nsIDOMNSEditableElement);
@@ -1611,7 +1611,7 @@ const ItemList = Class("ItemList", {
commandline.updateOutputHeight(false, Math.max(0, this._minHeight - this._container.height)); commandline.updateOutputHeight(false, Math.max(0, this._minHeight - this._container.height));
this._container.height = this._minHeight; this._container.height = this._minHeight;
this._container.height -= commandline.getSpaceNeeded() this._container.height -= commandline.getSpaceNeeded();
commandline.updateOutputHeight(false); commandline.updateOutputHeight(false);
this.timeout(function () { this._container.height -= commandline.getSpaceNeeded(); }, 0); this.timeout(function () { this._container.height -= commandline.getSpaceNeeded(); }, 0);
}, },

View File

@@ -308,7 +308,7 @@ const CompletionContext = Class("CompletionContext", {
let res = {}; let res = {};
function result(quote) { function result(quote) {
yield ["result", quote ? function () quote[0] + quote[1](this.text) + quote[2] yield ["result", quote ? function () quote[0] + quote[1](this.text) + quote[2]
: function () this.text] : function () this.text];
}; };
for (let i in iterall(this.keys, result(this.quote))) { for (let i in iterall(this.keys, result(this.quote))) {
let [k, v] = i; let [k, v] = i;

View File

@@ -30,7 +30,7 @@ const ConfigBase = Class(ModuleBase, {
height: {img.height}px; height: {img.height}px;
</>)); </>));
img = null; img = null;
} };
}, },
styleHelp: function () { styleHelp: function () {

View File

@@ -65,7 +65,7 @@
"services", "services",
"statusline", "statusline",
"styles", "styles",
"template", "template"
].forEach(modules.load); ].forEach(modules.load);
prefix.unshift("chrome://" + modules.services.get("dactyl:").name + "/content/"); prefix.unshift("chrome://" + modules.services.get("dactyl:").name + "/content/");

View File

@@ -327,7 +327,7 @@ const Dactyl = Module("dactyl", {
return this.usereval( return this.usereval(
"(function (" + "(function (" +
Array.slice(arguments, 0, -1).join(", ") + Array.slice(arguments, 0, -1).join(", ") +
") { " + arguments[arguments.length - 1] + " })") ") { " + arguments[arguments.length - 1] + " })");
}, },
// partial sixth level expression evaluation // partial sixth level expression evaluation
@@ -617,7 +617,7 @@ const Dactyl = Module("dactyl", {
data.push(name); data.push(name);
data.push('="'); data.push('="');
data.push(<>{value}</>.toXMLString()); data.push(<>{value}</>.toXMLString());
data.push('"') data.push('"');
} }
if (node.localName in empty) if (node.localName in empty)
data.push(" />"); data.push(" />");
@@ -644,7 +644,7 @@ const Dactyl = Module("dactyl", {
.join("\n"); .join("\n");
addDataEntry("help.css", data.replace(/chrome:[^ ")]+\//g, "")); addDataEntry("help.css", data.replace(/chrome:[^ ")]+\//g, ""));
let re = /(chrome:[^ ");]+\/)([^ ");]+)/g; let m, re = /(chrome:[^ ");]+\/)([^ ");]+)/g;
while ((m = re.exec(data))) while ((m = re.exec(data)))
chrome[m[0]] = m[2]; chrome[m[0]] = m[2];
@@ -1520,7 +1520,7 @@ const Dactyl = Module("dactyl", {
function callResult(method) { function callResult(method) {
let args = Array.slice(arguments, 1); let args = Array.slice(arguments, 1);
return function (result) { result[method].apply(result, args) }; return function (result) { result[method].apply(result, args); };
} }
commands.add(["exta[dd]"], commands.add(["exta[dd]"],
@@ -1774,7 +1774,7 @@ const Dactyl = Module("dactyl", {
}, { }, {
argcount: "1", argcount: "1",
completer: function (context) { completer: function (context) {
completion.toolbar(context) completion.toolbar(context);
if (filter) if (filter)
context.filters.push(filter); context.filters.push(filter);
}, },
@@ -1966,7 +1966,7 @@ const Dactyl = Module("dactyl", {
}; };
completion.window = function window(context) { completion.window = function window(context) {
context.title = ["Window", "Title"] context.title = ["Window", "Title"];
context.keys = { text: function (win) dactyl.windows.indexOf(win) + 1, description: function (win) win.document.title }; context.keys = { text: function (win) dactyl.windows.indexOf(win) + 1, description: function (win) win.document.title };
context.completions = dactyl.windows; context.completions = dactyl.windows;
}; };

View File

@@ -45,7 +45,7 @@ const Hints = Module("hints", {
t: Mode("Follow hint in a new tab", function (elem) buffer.followLink(elem, dactyl.NEW_TAB)), t: Mode("Follow hint in a new tab", function (elem) buffer.followLink(elem, dactyl.NEW_TAB)),
b: Mode("Follow hint in a background tab", function (elem) buffer.followLink(elem, dactyl.NEW_BACKGROUND_TAB)), b: Mode("Follow hint in a background tab", function (elem) buffer.followLink(elem, dactyl.NEW_BACKGROUND_TAB)),
w: Mode("Follow hint in a new window", function (elem) buffer.followLink(elem, dactyl.NEW_WINDOW), extended), w: Mode("Follow hint in a new window", function (elem) buffer.followLink(elem, dactyl.NEW_WINDOW), extended),
F: Mode("Open multiple hints in tabs", function (elem) { buffer.followLink(elem, dactyl.NEW_BACKGROUND_TAB); hints.show("F") }), F: Mode("Open multiple hints in tabs", function (elem) { buffer.followLink(elem, dactyl.NEW_BACKGROUND_TAB); hints.show("F"); }),
O: Mode("Generate an ':open URL' using hint", function (elem, loc) commandline.open(":", "open " + loc, modes.EX)), O: Mode("Generate an ':open URL' using hint", function (elem, loc) commandline.open(":", "open " + loc, modes.EX)),
T: Mode("Generate a ':tabopen URL' using hint", function (elem, loc) commandline.open(":", "tabopen " + loc, modes.EX)), T: Mode("Generate a ':tabopen URL' using hint", function (elem, loc) commandline.open(":", "tabopen " + loc, modes.EX)),
W: Mode("Generate a ':winopen URL' using hint", function (elem, loc) commandline.open(":", "winopen " + loc, modes.EX)), W: Mode("Generate a ':winopen URL' using hint", function (elem, loc) commandline.open(":", "winopen " + loc, modes.EX)),
@@ -444,7 +444,7 @@ const Hints = Module("hints", {
// OK. return hit. But there's more than one hint, and // OK. return hit. But there's more than one hint, and
// there's no tab-selected current link. Do not follow in mode 2 // there's no tab-selected current link. Do not follow in mode 2
dactyl.assert(options["followhints"] != 2 || this._validHints.length == 1 || this._hintNumber) dactyl.assert(options["followhints"] != 2 || this._validHints.length == 1 || this._hintNumber);
} }
if (!followFirst) { if (!followFirst) {
@@ -928,7 +928,7 @@ const Hints = Module("hints", {
[0x249c, 0x24b5, "a"], [0x24b6, 0x24cf, "A"], [0x249c, 0x24b5, "a"], [0x24b6, 0x24cf, "A"],
[0x24d0, 0x24e9, "a"], [0x24d0, 0x24e9, "a"],
[0xfb00, 0xfb06, ["ff", "fi", "fl", "ffi", "ffl", "st", "st"]], [0xfb00, 0xfb06, ["ff", "fi", "fl", "ffi", "ffl", "st", "st"]],
[0xff21, 0xff3a, "A"], [0xff41, 0xff5a, "a"], [0xff21, 0xff3a, "A"], [0xff41, 0xff5a, "a"]
].forEach(function (start, stop, val) { ].forEach(function (start, stop, val) {
if (typeof a[2] != "string") if (typeof a[2] != "string")
for (i=start; i <= stop; i++) for (i=start; i <= stop; i++)

View File

@@ -337,7 +337,7 @@ const JavaScript = Module("javascript", {
if (!isNaN(key)) if (!isNaN(key))
return parseInt(key); return parseInt(key);
if (/^[A-Z_][A-Z0-9_]*$/.test(key)) if (/^[A-Z_][A-Z0-9_]*$/.test(key))
return "" return "";
return item; return item;
} }
}; };
@@ -363,7 +363,7 @@ const JavaScript = Module("javascript", {
this.context.fork(obj[1], this._top.offset, this, this._fill, this.context.fork(obj[1], this._top.offset, this, this._fill,
update(args, { update(args, {
obj: obj[0], obj: obj[0],
name: obj[1], name: obj[1]
})); }));
if (orig) if (orig)

View File

@@ -449,7 +449,7 @@ const Mappings = Module("mappings", {
const opts = { const opts = {
completer: function (context, args) { completer: function (context, args) {
if (args.length == 1) if (args.length == 1)
return completion.userMapping(context, args, mapmodes) return completion.userMapping(context, args, mapmodes);
if (args["-javascript"]) if (args["-javascript"])
return completion.javascript(context); return completion.javascript(context);
if (args["-ex"]) if (args["-ex"])

View File

@@ -532,7 +532,7 @@ const Options = Module("options", {
this._prefContexts = []; this._prefContexts = [];
for (let [, pref] in Iterator(this.allPrefs(Options.OLD_SAVED))) { for (let [, pref] in Iterator(this.allPrefs(Options.OLD_SAVED))) {
let saved = Options.SAVED + pref.substr(Options.OLD_SAVED.length) let saved = Options.SAVED + pref.substr(Options.OLD_SAVED.length);
if (!this.getPref(saved)) if (!this.getPref(saved))
this.setPref(saved, this.getPref(pref)); this.setPref(saved, this.getPref(pref));
this.resetPref(pref); this.resetPref(pref);
@@ -1155,13 +1155,13 @@ const Options = Module("options", {
if (opt.operator == "-" && isarray(opt.values)) { if (opt.operator == "-" && isarray(opt.values)) {
let have = set([i.text for (i in context.allItems)]); let have = set([i.text for (i in context.allItems)]);
context = context.fork("current-values", 0); context = context.fork("current-values", 0);
context.anchored = optcontext.anchored context.anchored = optcontext.anchored;
context.maxItems = optcontext.maxItems context.maxItems = optcontext.maxItems;
context.filters.push(function (i) !set.has(have, i.text)); context.filters.push(function (i) !set.has(have, i.text));
completion.optionValue(context, opt.name, opt.operator, null, completion.optionValue(context, opt.name, opt.operator, null,
function (context) { function (context) {
context.generate = function () option.values.map(function (o) [o, ""]) context.generate = function () option.values.map(function (o) [o, ""]);
}); });
context.title = ["Current values"]; context.title = ["Current values"];
} }
@@ -1295,7 +1295,7 @@ const Options = Module("options", {
let opt = options.parseOpt(spec); let opt = options.parseOpt(spec);
return opt.option && opt.option.privateData && return opt.option && opt.option.privateData &&
(!callable(opt.option.privateData) || (!callable(opt.option.privateData) ||
opt.option.privateData(opt.values)) opt.option.privateData(opt.values));
}) })
}, params.extra || {})); }, params.extra || {}));
}); });

View File

@@ -303,7 +303,7 @@ const Tabs = Module("tabs", {
return; return;
} }
let tabs = this.visibleTabs let tabs = this.visibleTabs;
if (tabs.indexOf(tab) < 0) if (tabs.indexOf(tab) < 0)
tabs = this.allTabs; tabs = this.allTabs;
let index = tabs.indexOf(tab); let index = tabs.indexOf(tab);

View File

@@ -38,14 +38,14 @@ if (!Object.defineProperty)
objproto.__defineGetter__.call(obj, prop, desc.get); objproto.__defineGetter__.call(obj, prop, desc.get);
if ("set" in desc) if ("set" in desc)
objproto.__defineSetter__.call(obj, prop, desc.set); objproto.__defineSetter__.call(obj, prop, desc.set);
} };
if (!Object.getOwnPropertyDescriptor) if (!Object.getOwnPropertyDescriptor)
Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(obj, prop) { Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(obj, prop) {
if (!hasOwnProperty.call(obj, prop)) if (!hasOwnProperty.call(obj, prop))
return undefined; return undefined;
let desc = { let desc = {
configurable: true, configurable: true,
enumerable: objproto.propertyIsEnumerable.call(obj, prop), enumerable: objproto.propertyIsEnumerable.call(obj, prop)
}; };
var get = obj.__lookupGetter__(prop), var get = obj.__lookupGetter__(prop),
set = obj.__lookupSetter__(prop); set = obj.__lookupSetter__(prop);
@@ -58,7 +58,7 @@ if (!Object.getOwnPropertyDescriptor)
if (set) if (set)
desc.set = set; desc.set = set;
return desc; return desc;
} };
if (!Object.getOwnPropertyNames) if (!Object.getOwnPropertyNames)
Object.getOwnPropertyNames = function getOwnPropertyNames(obj) { Object.getOwnPropertyNames = function getOwnPropertyNames(obj) {
// This is an ugly and unfortunately necessary hack. // This is an ugly and unfortunately necessary hack.
@@ -101,7 +101,7 @@ function defmodule(name, params) {
} }
defmodule.loadLog = []; defmodule.loadLog = [];
Object.defineProperty(defmodule.loadLog, "push", { value: function (val) { dump(val + "\n"); this[this.length] = val } }); Object.defineProperty(defmodule.loadLog, "push", { value: function (val) { dump(val + "\n"); this[this.length] = val; } });
defmodule.modules = []; defmodule.modules = [];
defmodule.times = { all: 0 }; defmodule.times = { all: 0 };
defmodule.time = function time(major, minor, func, self) { defmodule.time = function time(major, minor, func, self) {
@@ -144,7 +144,7 @@ defmodule("base", {
"endmodule", "extend", "foreach", "isarray", "isgenerator", "endmodule", "extend", "foreach", "isarray", "isgenerator",
"isinstance", "isobject", "isstring", "issubclass", "iter", "iterall", "isinstance", "isobject", "isstring", "issubclass", "iter", "iterall",
"keys", "memoize", "properties", "requiresMainThread", "set", "keys", "memoize", "properties", "requiresMainThread", "set",
"update", "values", "update", "values"
], ],
use: ["services"] use: ["services"]
}); });
@@ -194,7 +194,7 @@ function properties(obj, prototypes, debugger_) {
for (let key in iter) for (let key in iter)
if (!prototypes || !set.add(seen, key) && obj != orig) if (!prototypes || !set.add(seen, key) && obj != orig)
yield key yield key;
} }
} }
@@ -878,10 +878,10 @@ const Timer = Class("Timer", {
*/ */
function UTF8(str) { function UTF8(str) {
try { try {
return decodeURIComponent(escape(str)) return decodeURIComponent(escape(str));
} }
catch (e) { catch (e) {
return str return str;
} }
} }
@@ -1017,7 +1017,7 @@ const array = Class("array", Array, {
* @returns {Array} * @returns {Array}
*/ */
zip: function zip(ary1, ary2) { zip: function zip(ary1, ary2) {
let res = [] let res = [];
for(let [i, item] in Iterator(ary1)) for(let [i, item] in Iterator(ary1))
res.push([item, i in ary2 ? ary2[i] : ""]); res.push([item, i in ary2 ? ary2[i] : ""]);
return res; return res;

View File

@@ -147,7 +147,7 @@ const Highlights = Module("Highlight", {
*/ */
selector: function (class_) { selector: function (class_) {
let [, hl, rest] = class_.match(/^(\w*)(.*)/); let [, hl, rest] = class_.match(/^(\w*)(.*)/);
let pattern = "[dactyl|highlight~=" + hl + "]" let pattern = "[dactyl|highlight~=" + hl + "]";
if (this.highlight[hl] && this.highlight[hl].class != class_) if (this.highlight[hl] && this.highlight[hl].class != class_)
pattern = this.highlight[hl].selector; pattern = this.highlight[hl].selector;
return pattern + rest; return pattern + rest;
@@ -318,7 +318,7 @@ const Highlights = Module("Highlight", {
context.completions = array.flatten( context.completions = array.flatten(
modules.io.getRuntimeDirectories("colors").map( modules.io.getRuntimeDirectories("colors").map(
function (dir) dir.readDirectory().filter( function (dir) dir.readDirectory().filter(
function (file) /\.vimp$/.test(file.leafName)))) function (file) /\.vimp$/.test(file.leafName))));
}; };

View File

@@ -23,7 +23,7 @@ const Config = Module("config", ConfigBase, {
ShellCmdPost: "Triggered after executing a shell command with :!cmd", ShellCmdPost: "Triggered after executing a shell command with :!cmd",
Enter: "Triggered after Firefox starts", Enter: "Triggered after Firefox starts",
LeavePre: "Triggered before exiting Firefox, just before destroying each module", LeavePre: "Triggered before exiting Firefox, just before destroying each module",
Leave: "Triggered before exiting Firefox", Leave: "Triggered before exiting Firefox"
}, },
defaults: { defaults: {