mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 07:28:00 +01:00
Whitespace fixes.
--HG-- extra : rebase_source : 7bc98c4cf1a8ca89cfbfb1f96ffe9fa72565c663
This commit is contained in:
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
/** @scope modules */
|
/** @scope modules */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A structure representing the options available for a command.
|
* A structure representing the options available for a command.
|
||||||
*
|
*
|
||||||
@@ -149,7 +148,6 @@ const Command = Class("Command", {
|
|||||||
if (args.bang && !this.bang)
|
if (args.bang && !this.bang)
|
||||||
throw FailedAssertion("E477: No ! allowed");
|
throw FailedAssertion("E477: No ! allowed");
|
||||||
|
|
||||||
|
|
||||||
dactyl.trapErrors(function exec(command) {
|
dactyl.trapErrors(function exec(command) {
|
||||||
if (this.always)
|
if (this.always)
|
||||||
this.always(args, modifiers);
|
this.always(args, modifiers);
|
||||||
@@ -709,9 +707,9 @@ const Commands = Module("commands", {
|
|||||||
}
|
}
|
||||||
let [count, arg, quote] = Commands.parseArg(str, null, keepQuotes);
|
let [count, arg, quote] = Commands.parseArg(str, null, keepQuotes);
|
||||||
if (quote == "\\" && !complete)
|
if (quote == "\\" && !complete)
|
||||||
return [,,,"Trailing \\"];
|
return [, , , "Trailing \\"];
|
||||||
if (quote && !complete)
|
if (quote && !complete)
|
||||||
return [,,,"E114: Missing quote: " + quote];
|
return [, , , "E114: Missing quote: " + quote];
|
||||||
return [count, arg, quote];
|
return [count, arg, quote];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -527,7 +527,7 @@ const Dactyl = Module("dactyl", {
|
|||||||
|
|
||||||
let chrome = {};
|
let chrome = {};
|
||||||
let styles = {};
|
let styles = {};
|
||||||
for (let [file,] in Iterator(services.get("dactyl:").FILE_MAP)) {
|
for (let [file, ] in Iterator(services.get("dactyl:").FILE_MAP)) {
|
||||||
dactyl.open("dactyl://help/" + file);
|
dactyl.open("dactyl://help/" + file);
|
||||||
dactyl.modules.events.waitForPageLoad();
|
dactyl.modules.events.waitForPageLoad();
|
||||||
let data = [
|
let data = [
|
||||||
@@ -1420,8 +1420,8 @@ const Dactyl = Module("dactyl", {
|
|||||||
},
|
},
|
||||||
getAddonsByTypes: function (types, callback) {
|
getAddonsByTypes: function (types, callback) {
|
||||||
let res = [];
|
let res = [];
|
||||||
for (let [,type] in Iterator(types))
|
for (let [, type] in Iterator(types))
|
||||||
for (let [,item] in Iterator(services.get("extensionManager")
|
for (let [, item] in Iterator(services.get("extensionManager")
|
||||||
.getItemList(Ci.nsIUpdateItem["TYPE_" + type.toUpperCase()], {})))
|
.getItemList(Ci.nsIUpdateItem["TYPE_" + type.toUpperCase()], {})))
|
||||||
res.push(this.getAddonByID(item));
|
res.push(this.getAddonByID(item));
|
||||||
callback(res);
|
callback(res);
|
||||||
|
|||||||
@@ -520,7 +520,7 @@ const Editor = Module("editor", {
|
|||||||
addMovementMap(["gg", "<C-Home>"], false, "completeMove", false, "cmd_moveTop", "cmd_selectTop");
|
addMovementMap(["gg", "<C-Home>"], false, "completeMove", false, "cmd_moveTop", "cmd_selectTop");
|
||||||
addMovementMap(["G", "<C-End>"], false, "completeMove", true, "cmd_moveBottom", "cmd_selectBottom");
|
addMovementMap(["G", "<C-End>"], false, "completeMove", true, "cmd_moveBottom", "cmd_selectBottom");
|
||||||
addMovementMap(["0", "^", "<Home>"], false, "intraLineMove", false, "cmd_beginLine", "cmd_selectBeginLine");
|
addMovementMap(["0", "^", "<Home>"], false, "intraLineMove", false, "cmd_beginLine", "cmd_selectBeginLine");
|
||||||
addMovementMap(["$", "<End>"], false, "intraLineMove", true, "cmd_endLine" , "cmd_selectEndLine" );
|
addMovementMap(["$", "<End>"], false, "intraLineMove", true, "cmd_endLine" , "cmd_selectEndLine");
|
||||||
|
|
||||||
addBeginInsertModeMap(["i", "<Insert>"], []);
|
addBeginInsertModeMap(["i", "<Insert>"], []);
|
||||||
addBeginInsertModeMap(["a"], ["cmd_charNext"]);
|
addBeginInsertModeMap(["a"], ["cmd_charNext"]);
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ const Modes = Module("modes", {
|
|||||||
modes.getMode(this.main).name +
|
modes.getMode(this.main).name +
|
||||||
(!this.extended ? "" :
|
(!this.extended ? "" :
|
||||||
"(" +
|
"(" +
|
||||||
[modes.getMode(1<<i).name for (i in util.range(0, 32)) if (this.extended & (1<<i))].join("|") +
|
[modes.getMode(1 << i).name for (i in util.range(0, 32)) if (this.extended & (1 << i))].join("|") +
|
||||||
")") + "]";
|
")") + "]";
|
||||||
return struct;
|
return struct;
|
||||||
})(),
|
})(),
|
||||||
|
|||||||
@@ -134,7 +134,8 @@ defineModule.time = function time(major, minor, func, self) {
|
|||||||
let time = Date.now();
|
let time = Date.now();
|
||||||
try {
|
try {
|
||||||
var res = func.apply(self, Array.slice(arguments, 4));
|
var res = func.apply(self, Array.slice(arguments, 4));
|
||||||
} catch (e) {
|
}
|
||||||
|
catch (e) {
|
||||||
loaded.util && util.reportError(e);
|
loaded.util && util.reportError(e);
|
||||||
}
|
}
|
||||||
let delta = Date.now() - time;
|
let delta = Date.now() - time;
|
||||||
|
|||||||
@@ -504,7 +504,8 @@ const Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakR
|
|||||||
(function rec(frame) {
|
(function rec(frame) {
|
||||||
try {
|
try {
|
||||||
res = res.concat(util.subdomains(frame.location.host));
|
res = res.concat(util.subdomains(frame.location.host));
|
||||||
} catch (e) {}
|
}
|
||||||
|
catch (e) {}
|
||||||
Array.forEach(frame.frames, rec);
|
Array.forEach(frame.frames, rec);
|
||||||
})(window.content);
|
})(window.content);
|
||||||
if (context.filter && !res.some(function (host) host.indexOf(context.filter) >= 0))
|
if (context.filter && !res.some(function (host) host.indexOf(context.filter) >= 0))
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ const Services = Module("Services", {
|
|||||||
this.add("windowMediator", "@mozilla.org/appshell/window-mediator;1", Ci.nsIWindowMediator);
|
this.add("windowMediator", "@mozilla.org/appshell/window-mediator;1", Ci.nsIWindowMediator);
|
||||||
this.add("windowWatcher", "@mozilla.org/embedcomp/window-watcher;1", Ci.nsIWindowWatcher);
|
this.add("windowWatcher", "@mozilla.org/embedcomp/window-watcher;1", Ci.nsIWindowWatcher);
|
||||||
|
|
||||||
|
|
||||||
this.addClass("file", "@mozilla.org/file/local;1", Ci.nsILocalFile);
|
this.addClass("file", "@mozilla.org/file/local;1", Ci.nsILocalFile);
|
||||||
this.addClass("file:", "@mozilla.org/network/protocol;1?name=file", Ci.nsIFileProtocolHandler);
|
this.addClass("file:", "@mozilla.org/network/protocol;1?name=file", Ci.nsIFileProtocolHandler);
|
||||||
this.addClass("find", "@mozilla.org/embedcomp/rangefind;1", Ci.nsIFind);
|
this.addClass("find", "@mozilla.org/embedcomp/rangefind;1", Ci.nsIFind);
|
||||||
|
|||||||
@@ -789,13 +789,13 @@ const Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
|||||||
if (field instanceof Ci.nsIDOMHTMLInputElement && field.type == "submit")
|
if (field instanceof Ci.nsIDOMHTMLInputElement && field.type == "submit")
|
||||||
elems.push(encode(field.name, field.value));
|
elems.push(encode(field.name, field.value));
|
||||||
|
|
||||||
for (let [,elem] in iter(form.elements)) {
|
for (let [, elem] in iter(form.elements)) {
|
||||||
if (set.has(util.editableInputs, elem.type)
|
if (set.has(util.editableInputs, elem.type)
|
||||||
|| /^(?:hidden|textarea)$/.test(elem.type)
|
|| /^(?:hidden|textarea)$/.test(elem.type)
|
||||||
|| elem.checked && /^(?:checkbox|radio)$/.test(elem.type))
|
|| elem.checked && /^(?:checkbox|radio)$/.test(elem.type))
|
||||||
elems.push(encode(elem.name, elem.value, elem === field));
|
elems.push(encode(elem.name, elem.value, elem === field));
|
||||||
else if (elem instanceof Ci.nsIDOMHTMLSelectElement) {
|
else if (elem instanceof Ci.nsIDOMHTMLSelectElement) {
|
||||||
for (let [,opt] in Iterator(elem.options))
|
for (let [, opt] in Iterator(elem.options))
|
||||||
if (opt.selected)
|
if (opt.selected)
|
||||||
elems.push(encode(elem.name, opt.value));
|
elems.push(encode(elem.name, opt.value));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user