1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 00:17:58 +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"]) {
this[prop] = this[prop].constructor();
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: [
{
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")
increment = elem.clientHeight - fontSize;
else
throw Error()
throw Error();
elem.scrollTop += number * increment;
},
@@ -1083,7 +1083,7 @@ const Buffer = Module("buffer", {
else if (increment == "pages")
increment = elem.clientWidth - fontSize;
else
throw Error()
throw Error();
elem.scrollLeft += number * increment;
},

View File

@@ -119,7 +119,7 @@ const CommandLine = Module("commandline", {
message: document.getElementById("dactyl-message"),
multilineOutput: document.getElementById("dactyl-multiline-output"),
multilineInput: document.getElementById("dactyl-multiline-input"),
multilineInput: document.getElementById("dactyl-multiline-input")
};
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));
this._container.height = this._minHeight;
this._container.height -= commandline.getSpaceNeeded()
this._container.height -= commandline.getSpaceNeeded();
commandline.updateOutputHeight(false);
this.timeout(function () { this._container.height -= commandline.getSpaceNeeded(); }, 0);
},

View File

@@ -308,7 +308,7 @@ const CompletionContext = Class("CompletionContext", {
let res = {};
function result(quote) {
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))) {
let [k, v] = i;

View File

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

View File

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

View File

@@ -327,7 +327,7 @@ const Dactyl = Module("dactyl", {
return this.usereval(
"(function (" +
Array.slice(arguments, 0, -1).join(", ") +
") { " + arguments[arguments.length - 1] + " })")
") { " + arguments[arguments.length - 1] + " })");
},
// partial sixth level expression evaluation
@@ -617,7 +617,7 @@ const Dactyl = Module("dactyl", {
data.push(name);
data.push('="');
data.push(<>{value}</>.toXMLString());
data.push('"')
data.push('"');
}
if (node.localName in empty)
data.push(" />");
@@ -644,7 +644,7 @@ const Dactyl = Module("dactyl", {
.join("\n");
addDataEntry("help.css", data.replace(/chrome:[^ ")]+\//g, ""));
let re = /(chrome:[^ ");]+\/)([^ ");]+)/g;
let m, re = /(chrome:[^ ");]+\/)([^ ");]+)/g;
while ((m = re.exec(data)))
chrome[m[0]] = m[2];
@@ -1520,7 +1520,7 @@ const Dactyl = Module("dactyl", {
function callResult(method) {
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]"],
@@ -1774,7 +1774,7 @@ const Dactyl = Module("dactyl", {
}, {
argcount: "1",
completer: function (context) {
completion.toolbar(context)
completion.toolbar(context);
if (filter)
context.filters.push(filter);
},
@@ -1966,7 +1966,7 @@ const Dactyl = Module("dactyl", {
};
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.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)),
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),
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)),
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)),
@@ -444,7 +444,7 @@ const Hints = Module("hints", {
// OK. return hit. But there's more than one hint, and
// 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) {
@@ -928,7 +928,7 @@ const Hints = Module("hints", {
[0x249c, 0x24b5, "a"], [0x24b6, 0x24cf, "A"],
[0x24d0, 0x24e9, "a"],
[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) {
if (typeof a[2] != "string")
for (i=start; i <= stop; i++)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -147,7 +147,7 @@ const Highlights = Module("Highlight", {
*/
selector: function (class_) {
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_)
pattern = this.highlight[hl].selector;
return pattern + rest;
@@ -318,7 +318,7 @@ const Highlights = Module("Highlight", {
context.completions = array.flatten(
modules.io.getRuntimeDirectories("colors").map(
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",
Enter: "Triggered after Firefox starts",
LeavePre: "Triggered before exiting Firefox, just before destroying each module",
Leave: "Triggered before exiting Firefox",
Leave: "Triggered before exiting Firefox"
},
defaults: {