mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-10 18:14:12 +01:00
Add missing semicolons, fix whitespace and normalise Vim modelines.
This commit is contained in:
@@ -380,4 +380,4 @@ var Abbreviations = Module("abbreviations", {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -122,7 +122,7 @@ var AutoCommands = Module("autocommands", {
|
||||
["td", {}, item.filter.toJSONXML ? item.filter.toJSONXML(modules) : String(item.filter)],
|
||||
["td", {}, String(item.command)]]),
|
||||
["tr", { style: "height: .5ex;" }]]).toArray(),
|
||||
["tr", { style: "height: .5ex;" }],
|
||||
["tr", { style: "height: .5ex;" }]
|
||||
])]);
|
||||
commandline.commandOutput(table);
|
||||
},
|
||||
@@ -296,4 +296,4 @@ var AutoCommands = Module("autocommands", {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -730,4 +730,4 @@ var Bookmarks = Module("bookmarks", {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -222,7 +222,7 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase),
|
||||
if (dactyl.forceTarget in openModes)
|
||||
mode = openModes[dactyl.forceTarget];
|
||||
|
||||
CommandExMode().open(mode + "open " + (args || ""))
|
||||
CommandExMode().open(mode + "open " + (args || ""));
|
||||
}
|
||||
|
||||
function decode(uri) util.losslessDecodeURI(uri)
|
||||
@@ -282,4 +282,4 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase),
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -54,7 +54,7 @@ var CommandWidgets = Class("CommandWidgets", {
|
||||
["vbox", { id: "dactyl-completions-" + s + "commandline-container", class: "dactyl-container", hidden: "false", collapsed: "true" },
|
||||
["iframe", { class: "dactyl-completions", id: "dactyl-completions-" + s + "commandline", src: "dactyl://content/buffer.xhtml",
|
||||
contextmenu: "dactyl-contextmenu", flex: "1", hidden: "false", collapsed: "false", highlight: "Events",
|
||||
events: "mowEvents" }]]]],
|
||||
events: "mowEvents" }]]]]
|
||||
});
|
||||
|
||||
this.elements = {};
|
||||
@@ -634,7 +634,7 @@ var CommandLine = Module("commandline", {
|
||||
|
||||
node.completionList = ItemList(elem);
|
||||
node.completionList.isAboveMow = node.id ==
|
||||
this.widgets.statusbar.commandline.id
|
||||
this.widgets.statusbar.commandline.id;
|
||||
}
|
||||
return node.completionList;
|
||||
},
|
||||
@@ -741,7 +741,7 @@ var CommandLine = Module("commandline", {
|
||||
if (val)
|
||||
this.widgets["message-pre"] = _("commandline.moreMessages", val) + " ";
|
||||
else
|
||||
this.widgets["message-pre"] = null
|
||||
this.widgets["message-pre"] = null;
|
||||
},
|
||||
|
||||
_lastEcho: null,
|
||||
@@ -1013,7 +1013,7 @@ var CommandLine = Module("commandline", {
|
||||
|
||||
this.store = this.store.filter(function (line) (line.value || line) != str);
|
||||
dactyl.trapErrors(function () {
|
||||
this.store.push({ value: str, timestamp: Date.now()*1000, privateData: privateData });
|
||||
this.store.push({ value: str, timestamp: Date.now() * 1000, privateData: privateData });
|
||||
}, this);
|
||||
this.store = this.store.slice(Math.max(0, this.store.length - options["history"]));
|
||||
},
|
||||
@@ -1768,7 +1768,7 @@ var CommandLine = Module("commandline", {
|
||||
});
|
||||
|
||||
let bind = function bind()
|
||||
mappings.add.apply(mappings, [[modes.COMMAND_LINE]].concat(Array.slice(arguments)))
|
||||
mappings.add.apply(mappings, [[modes.COMMAND_LINE]].concat(Array.slice(arguments)));
|
||||
|
||||
bind(["<Esc>", "<C-[>"], "Stop waiting for completions or exit Command Line mode",
|
||||
function ({ self }) {
|
||||
@@ -2030,7 +2030,7 @@ var ItemList = Class("ItemList", {
|
||||
if (start < 0 || start >= this.itemCount)
|
||||
return null;
|
||||
|
||||
group = array.nth(groups, function (g) let (i = start - g.offsets.start) i >= 0 && i < g.itemCount, 0)
|
||||
group = array.nth(groups, function (g) let (i = start - g.offsets.start) i >= 0 && i < g.itemCount, 0);
|
||||
return [group.context, start - group.offsets.start];
|
||||
},
|
||||
|
||||
@@ -2342,7 +2342,7 @@ var ItemList = Class("ItemList", {
|
||||
container.scrollTop = scroll;
|
||||
if (scrollY != null)
|
||||
win.scrollTo(0, Math.max(scrollY, 0));
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -2455,4 +2455,4 @@ var ItemList = Class("ItemList", {
|
||||
})
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -83,7 +83,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
observers: {
|
||||
"dactyl-cleanup": function dactyl_cleanup(subject, reason) {
|
||||
let modules = dactyl.modules;
|
||||
@@ -682,7 +681,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
tag = function (map) [
|
||||
let (c = obj.modes[0].char) c ? c + "_" : "",
|
||||
map
|
||||
]
|
||||
];
|
||||
link = function (map) {
|
||||
let [, mode, name, extra] = /^(?:(.)_)?(?:<([^>]+)>)?(.*)$/.exec(map);
|
||||
let k = ["k", {}, extra];
|
||||
@@ -710,7 +709,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
let description = ["description", {},
|
||||
obj.description ? ["p", {}, template.linkifyHelp(obj.description.replace(/\.?$/, "."), true)] : "",
|
||||
extraHelp ? extraHelp : "",
|
||||
!(extraHelp || obj.description) ? ["p", {}, /*L*/ "Sorry, no help available."] : ""]
|
||||
!(extraHelp || obj.description) ? ["p", {}, /*L*/ "Sorry, no help available."] : ""];
|
||||
|
||||
res.push(
|
||||
["item", {},
|
||||
@@ -1200,7 +1199,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
dactyl.reportError(e, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -1829,7 +1828,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
commandline.commandOutput([
|
||||
["div", {}, [config.appName, " ", config.version, date, " running on: "].join("")],
|
||||
["div", {}, [window.navigator.userAgent].join("")]
|
||||
])
|
||||
]);
|
||||
}
|
||||
}, {
|
||||
argCount: "0",
|
||||
@@ -2003,4 +2002,4 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -64,7 +64,7 @@ function chromeDocuments() {
|
||||
Ci.nsIDocShell.ENUMERATE_FORWARDS);
|
||||
while (docShells.hasMoreElements())
|
||||
try {
|
||||
yield docShells.getNext().QueryInterface(Ci.nsIDocShell).contentViewer.DOMDocument;
|
||||
yield docShells.getNext().QueryInterface(Ci.nsIDocShell).contentViewer.DOMDocument;
|
||||
}
|
||||
catch (e) {}
|
||||
}
|
||||
@@ -73,4 +73,4 @@ function chromeDocuments() {
|
||||
|
||||
var EXPORTED_SYMBOLS = ["cleanup", "init"];
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et ft=javascript:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript:
|
||||
|
||||
@@ -870,7 +870,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
|
||||
function addBeginInsertModeMap(keys, commands, description) {
|
||||
mappings.add([modes.TEXT_EDIT], keys, description || "",
|
||||
function () {
|
||||
commands.forEach(function (cmd) { editor.executeCommand(cmd, 1) });
|
||||
commands.forEach(function (cmd) { editor.executeCommand(cmd, 1); });
|
||||
modes.push(modes.INSERT);
|
||||
},
|
||||
{ type: "editor" });
|
||||
@@ -1148,13 +1148,12 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
|
||||
mappings.add([modes.TEXT_EDIT], names, description,
|
||||
action, update({ type: "editor" }, params));
|
||||
|
||||
|
||||
bind(["<C-a>"], "Increment the next number",
|
||||
function ({ count }) { editor.modifyNumber(count || 1) },
|
||||
function ({ count }) { editor.modifyNumber(count || 1); },
|
||||
{ count: true });
|
||||
|
||||
bind(["<C-x>"], "Decrement the next number",
|
||||
function ({ count }) { editor.modifyNumber(-(count || 1)) },
|
||||
function ({ count }) { editor.modifyNumber(-(count || 1)); },
|
||||
{ count: true });
|
||||
|
||||
// text edit mode
|
||||
@@ -1326,7 +1325,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
|
||||
{ count: true });
|
||||
|
||||
let bind = function bind() mappings.add.apply(mappings,
|
||||
[[modes.AUTOCOMPLETE]].concat(Array.slice(arguments)))
|
||||
[[modes.AUTOCOMPLETE]].concat(Array.slice(arguments)));
|
||||
|
||||
bind(["<Esc>"], "Return to Insert mode",
|
||||
function () Events.PASS_THROUGH);
|
||||
@@ -1407,4 +1406,4 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -9,4 +9,4 @@ catch (e) { __dactyl_eval_error = e; }
|
||||
// This work is licensed for reuse under an MIT license. Details are
|
||||
// given in the LICENSE.txt file included with this file.
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -970,7 +970,7 @@ var Events = Module("events", {
|
||||
return DOM(elem).isEditable ||
|
||||
isinstance(elem, [Ci.nsIDOMHTMLEmbedElement,
|
||||
Ci.nsIDOMHTMLObjectElement,
|
||||
Ci.nsIDOMHTMLSelectElement])
|
||||
Ci.nsIDOMHTMLSelectElement]);
|
||||
},
|
||||
|
||||
kill: function kill(event) {
|
||||
@@ -1172,4 +1172,4 @@ var Events = Module("events", {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -24,4 +24,4 @@ function checkFragment() {
|
||||
document.addEventListener("load", checkFragment, true);
|
||||
document.addEventListener("hashChange", checkFragment, true);
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -1352,7 +1352,7 @@ var Hints = Module("hints", {
|
||||
{
|
||||
values: {
|
||||
"0": "Follow the first hint as soon as typed text uniquely identifies it. Follow the selected hint on <Return>.",
|
||||
"1": "Follow the selected hint on <Return>.",
|
||||
"1": "Follow the selected hint on <Return>."
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1389,4 +1389,4 @@ var Hints = Module("hints", {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -61,12 +61,12 @@ var History = Module("history", {
|
||||
},
|
||||
|
||||
get session() {
|
||||
let webNav = window.getWebNavigation()
|
||||
let webNav = window.getWebNavigation();
|
||||
let sh = webNav.sessionHistory;
|
||||
|
||||
let obj = [];
|
||||
obj.__defineGetter__("index", function () sh.index);
|
||||
obj.__defineSetter__("index", function (val) { webNav.gotoIndex(val) });
|
||||
obj.__defineSetter__("index", function (val) { webNav.gotoIndex(val); });
|
||||
obj.__iterator__ = function () array.iterItems(this);
|
||||
|
||||
for (let item in iter(sh.SHistoryEnumerator, Ci.nsIHistoryEntry))
|
||||
@@ -371,13 +371,13 @@ var History = Module("history", {
|
||||
{ count: true });
|
||||
|
||||
bind(["[d"], "Go back to the previous domain in the browser history",
|
||||
function ({ count }) { history.search("domain", -Math.max(count, 1)) },
|
||||
function ({ count }) { history.search("domain", -Math.max(count, 1)); },
|
||||
{ count: true });
|
||||
|
||||
bind(["]d"], "Go forward to the next domain in the browser history",
|
||||
function ({ count }) { history.search("domain", Math.max(count, 1)) },
|
||||
function ({ count }) { history.search("domain", Math.max(count, 1)); },
|
||||
{ count: true });
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -322,3 +322,4 @@ var KeyArgProcessor = Class("KeyArgProcessor", KeyProcessor, {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -496,7 +496,7 @@ var Mappings = Module("mappings", {
|
||||
["td", {}, modeSign],
|
||||
["td", {}, name],
|
||||
["td", {}, map.rhs || map.action.toSource()]])),
|
||||
["tr", { style: "height: .5ex;" }]])]
|
||||
["tr", { style: "height: .5ex;" }]])];
|
||||
|
||||
// E4X-FIXME
|
||||
// // TODO: Move this to an ItemList to show this automatically
|
||||
@@ -572,7 +572,7 @@ var Mappings = Module("mappings", {
|
||||
options: [
|
||||
{
|
||||
names: ["-arg", "-a"],
|
||||
description: "Accept an argument after the requisite key press",
|
||||
description: "Accept an argument after the requisite key press"
|
||||
},
|
||||
{
|
||||
names: ["-builtin", "-b"],
|
||||
@@ -828,8 +828,8 @@ var Mappings = Module("mappings", {
|
||||
mappings: function initMappings(dactyl, modules, window) {
|
||||
mappings.add([modes.COMMAND],
|
||||
["\\"], "Emits <Leader> pseudo-key",
|
||||
function () { events.feedkeys("<Leader>") });
|
||||
function () { events.feedkeys("<Leader>"); });
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -233,7 +233,7 @@ var Marks = Module("marks", {
|
||||
|
||||
_scrollTo: function _scrollTo(mark) {
|
||||
if (!mark.path)
|
||||
var node = buffer.findScrollable(0, (mark.offset || mark.position).x)
|
||||
var node = buffer.findScrollable(0, (mark.offset || mark.position).x);
|
||||
else
|
||||
for (node in DOM.XPath(mark.path, buffer.focusedFrame.document))
|
||||
break;
|
||||
@@ -303,7 +303,6 @@ var Marks = Module("marks", {
|
||||
Math.round(mark.position.y * 100) + "%)",
|
||||
(tab && "tab: " + tabs.index(tab))
|
||||
].filter(util.identity).join(", ");
|
||||
|
||||
},
|
||||
|
||||
isLocalMark: bind("test", /^[a-z`']$/),
|
||||
@@ -408,4 +407,4 @@ var Marks = Module("marks", {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -606,7 +606,7 @@ var Modes = Module("modes", {
|
||||
},
|
||||
|
||||
setter: function (vals) {
|
||||
modes.all.forEach(function (m) { delete m.passUnknown });
|
||||
modes.all.forEach(function (m) { delete m.passUnknown; });
|
||||
|
||||
vals = vals.map(function (v) update(new String(v.toLowerCase()), {
|
||||
mode: v.replace(/^!/, "").toUpperCase(),
|
||||
@@ -634,8 +634,8 @@ var Modes = Module("modes", {
|
||||
},
|
||||
prefs: function initPrefs() {
|
||||
prefs.watch("accessibility.browsewithcaret",
|
||||
function () { modes.onCaretChange.apply(modes, arguments) });
|
||||
function () { modes.onCaretChange.apply(modes, arguments); });
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -399,4 +399,4 @@ var MOW = Module("mow", {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -204,4 +204,4 @@ var QuickMarks = Module("quickmarks", {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -269,7 +269,7 @@ var StatusLine = Module("statusline", {
|
||||
});
|
||||
},
|
||||
|
||||
updateUrl: deprecated("statusline.status", function updateUrl(url) { this.status = url || buffer.uri }),
|
||||
updateUrl: deprecated("statusline.status", function updateUrl(url) { this.status = url || buffer.uri; }),
|
||||
|
||||
/**
|
||||
* Set the contents of the status line's input buffer to the given
|
||||
@@ -393,4 +393,4 @@ var StatusLine = Module("statusline", {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
@@ -237,7 +237,7 @@ var Tabs = Module("tabs", {
|
||||
return this._groups;
|
||||
|
||||
if (func)
|
||||
func = bind(function (func) { func(this._groups) }, this, func);
|
||||
func = bind(function (func) { func(this._groups); }, this, func);
|
||||
|
||||
if (window.TabView && window.TabView._initFrame)
|
||||
window.TabView._initFrame(func);
|
||||
@@ -335,7 +335,6 @@ var Tabs = Module("tabs", {
|
||||
completion.listCompleter("buffer", filter);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Return an iterator of tabs matching the given filter. If no
|
||||
* *filter* or *count* is provided, returns the currently selected
|
||||
@@ -1312,4 +1311,4 @@ var Tabs = Module("tabs", {
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
// vim: set fdm=marker sw=4 sts=4 ts=8 et:
|
||||
|
||||
Reference in New Issue
Block a user