mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 08:07:59 +01:00
Run stylebot -- semicolons.
This commit is contained in:
@@ -1535,7 +1535,7 @@ var Buffer = Module("buffer", {
|
|||||||
|
|
||||||
commands.add(["st[op]"],
|
commands.add(["st[op]"],
|
||||||
"Stop loading the current web page",
|
"Stop loading the current web page",
|
||||||
function () { buffer.stop() },
|
function () { buffer.stop(); },
|
||||||
{ argCount: "0" });
|
{ argCount: "0" });
|
||||||
|
|
||||||
commands.add(["vie[wsource]"],
|
commands.add(["vie[wsource]"],
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ var CommandWidgets = Class("CommandWidgets", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
let res, self = this;
|
let res, self = this;
|
||||||
return Class.replaceProperty(this, name, this[name])
|
return Class.replaceProperty(this, name, this[name]);
|
||||||
},
|
},
|
||||||
|
|
||||||
get completionList() this._whenReady("completionList", "dactyl-completions"),
|
get completionList() this._whenReady("completionList", "dactyl-completions"),
|
||||||
@@ -300,7 +300,6 @@ var CommandWidgets = Class("CommandWidgets", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var CommandMode = Class("CommandMode", {
|
var CommandMode = Class("CommandMode", {
|
||||||
init: function init() {
|
init: function init() {
|
||||||
this.keepCommand = userContext.hidden_option_command_afterimage;
|
this.keepCommand = userContext.hidden_option_command_afterimage;
|
||||||
@@ -600,7 +599,7 @@ var CommandLine = Module("commandline", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
get lastCommand() this._lastCommand || this.command,
|
get lastCommand() this._lastCommand || this.command,
|
||||||
set lastCommand(val) { this._lastCommand = val },
|
set lastCommand(val) { this._lastCommand = val; },
|
||||||
|
|
||||||
clear: function clear() {
|
clear: function clear() {
|
||||||
if (this.widgets.message && this.widgets.message[1] === this._lastClearable)
|
if (this.widgets.message && this.widgets.message[1] === this._lastClearable)
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ var Command = Class("Command", {
|
|||||||
if (callable(params))
|
if (callable(params))
|
||||||
var makeParams = function makeParams(self, args)
|
var makeParams = function makeParams(self, args)
|
||||||
iter.toObject([k, process(v)]
|
iter.toObject([k, process(v)]
|
||||||
for ([k, v] in iter(params.apply(self, args))))
|
for ([k, v] in iter(params.apply(self, args))));
|
||||||
else if (params)
|
else if (params)
|
||||||
makeParams = function makeParams(self, args)
|
makeParams = function makeParams(self, args)
|
||||||
iter.toObject([name, process(args[i])]
|
iter.toObject([name, process(args[i])]
|
||||||
@@ -800,7 +800,7 @@ var Commands = Module("commands", {
|
|||||||
// Push possible option matches into completions
|
// Push possible option matches into completions
|
||||||
if (complete && !onlyArgumentsRemaining)
|
if (complete && !onlyArgumentsRemaining)
|
||||||
completeOpts = options.filter(function (opt) opt.multiple || !set.has(args, opt.names[0]));
|
completeOpts = options.filter(function (opt) opt.multiple || !set.has(args, opt.names[0]));
|
||||||
}
|
};
|
||||||
let resetCompletions = function resetCompletions() {
|
let resetCompletions = function resetCompletions() {
|
||||||
completeOpts = null;
|
completeOpts = null;
|
||||||
args.completeArg = null;
|
args.completeArg = null;
|
||||||
@@ -808,7 +808,7 @@ var Commands = Module("commands", {
|
|||||||
args.completeFilter = null;
|
args.completeFilter = null;
|
||||||
args.completeStart = i;
|
args.completeStart = i;
|
||||||
args.quote = Commands.complQuote[""];
|
args.quote = Commands.complQuote[""];
|
||||||
}
|
};
|
||||||
if (complete) {
|
if (complete) {
|
||||||
resetCompletions();
|
resetCompletions();
|
||||||
matchOpts("");
|
matchOpts("");
|
||||||
@@ -820,7 +820,7 @@ var Commands = Module("commands", {
|
|||||||
complete.message = error;
|
complete.message = error;
|
||||||
else
|
else
|
||||||
dactyl.assert(false, error);
|
dactyl.assert(false, error);
|
||||||
}
|
};
|
||||||
|
|
||||||
outer:
|
outer:
|
||||||
while (i < str.length || complete) {
|
while (i < str.length || complete) {
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
}
|
}
|
||||||
catch (e if e.message == "can't wrap XML objects") {
|
catch (e if e.message == "can't wrap XML objects") {
|
||||||
// Horrible kludge.
|
// Horrible kludge.
|
||||||
callback.get().apply(null, [String(args[0])].concat(args.slice(1)))
|
callback.get().apply(null, [String(args[0])].concat(args.slice(1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
@@ -213,7 +213,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
for (let obj in values(results))
|
for (let obj in values(results))
|
||||||
if (obj.helpTag in services["dactyl:"].HELP_TAGS)
|
if (obj.helpTag in services["dactyl:"].HELP_TAGS)
|
||||||
yield dactyl.generateHelp(obj, null, null, true);
|
yield dactyl.generateHelp(obj, null, null, true);
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -227,7 +227,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
let elems = {
|
let elems = {
|
||||||
bell: document.getElementById("dactyl-bell"),
|
bell: document.getElementById("dactyl-bell"),
|
||||||
strut: document.getElementById("dactyl-bell-strut")
|
strut: document.getElementById("dactyl-bell-strut")
|
||||||
}
|
};
|
||||||
XML.ignoreWhitespace = true;
|
XML.ignoreWhitespace = true;
|
||||||
if (!elems.bell)
|
if (!elems.bell)
|
||||||
util.overlayWindow(window, {
|
util.overlayWindow(window, {
|
||||||
@@ -609,13 +609,13 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
};
|
||||||
// Find the tags in the document.
|
// Find the tags in the document.
|
||||||
let addTags = function addTags(file, doc) {
|
let addTags = function addTags(file, doc) {
|
||||||
for (let elem in util.evaluateXPath("//@tag|//dactyl:tags/text()|//dactyl:tag/text()", doc))
|
for (let elem in util.evaluateXPath("//@tag|//dactyl:tags/text()|//dactyl:tag/text()", doc))
|
||||||
for (let tag in values((elem.value || elem.textContent).split(/\s+/)))
|
for (let tag in values((elem.value || elem.textContent).split(/\s+/)))
|
||||||
tagMap[tag] = file;
|
tagMap[tag] = file;
|
||||||
}
|
};
|
||||||
|
|
||||||
let namespaces = ["locale-local", "locale"];
|
let namespaces = ["locale-local", "locale"];
|
||||||
services["dactyl:"].init({});
|
services["dactyl:"].init({});
|
||||||
@@ -759,7 +759,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
|
|
||||||
{rec(NEWS, 0)}
|
{rec(NEWS, 0)}
|
||||||
</document>.toXMLString()))
|
</document>.toXMLString()))
|
||||||
]
|
];
|
||||||
}
|
}
|
||||||
addTags("versions", util.httpGet("dactyl://help/versions").responseXML);
|
addTags("versions", util.httpGet("dactyl://help/versions").responseXML);
|
||||||
|
|
||||||
@@ -925,8 +925,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
k.@name = name;
|
k.@name = name;
|
||||||
if (mode)
|
if (mode)
|
||||||
k.@mode = mode;
|
k.@mode = mode;
|
||||||
return k
|
return k;
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
else if (obj instanceof Option) {
|
else if (obj instanceof Option) {
|
||||||
link = function (opt, name) <o>{name}</o>;
|
link = function (opt, name) <o>{name}</o>;
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ var ProcessorStack = Class("ProcessorStack", {
|
|||||||
|
|
||||||
this.processors = processors;
|
this.processors = processors;
|
||||||
|
|
||||||
return this.execute(result, options["timeout"] && options["timeoutlen"] === 0)
|
return this.execute(result, options["timeout"] && options["timeoutlen"] === 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ var KeyProcessor = Class("KeyProcessor", {
|
|||||||
if (self.preExecute)
|
if (self.preExecute)
|
||||||
self.preExecute.apply(self, args);
|
self.preExecute.apply(self, args);
|
||||||
let res = map.execute.call(map, update({ self: self.main.params.mappingSelf || self.main.mappingSelf || map },
|
let res = map.execute.call(map, update({ self: self.main.params.mappingSelf || self.main.mappingSelf || map },
|
||||||
args))
|
args));
|
||||||
if (self.postExecute)
|
if (self.postExecute)
|
||||||
self.postExecute.apply(self, args);
|
self.postExecute.apply(self, args);
|
||||||
return res;
|
return res;
|
||||||
@@ -596,7 +596,7 @@ var Events = Module("events", {
|
|||||||
var t = TYPES[type];
|
var t = TYPES[type];
|
||||||
var evt = doc.createEvent((t || "HTML") + "Events");
|
var evt = doc.createEvent((t || "HTML") + "Events");
|
||||||
|
|
||||||
let defaults = DEFAULTS[t || "HTML"]
|
let defaults = DEFAULTS[t || "HTML"];
|
||||||
evt["init" + t + "Event"].apply(evt, Object.keys(defaults)
|
evt["init" + t + "Event"].apply(evt, Object.keys(defaults)
|
||||||
.map(function (k) k in opts ? opts[k]
|
.map(function (k) k in opts ? opts[k]
|
||||||
: defaults[k]));
|
: defaults[k]));
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ var History = Module("history", {
|
|||||||
"visitcount"
|
"visitcount"
|
||||||
].map(function (order) [
|
].map(function (order) [
|
||||||
["+" + order.replace(" ", ""), "Sort by " + order + " ascending"],
|
["+" + order.replace(" ", ""), "Sort by " + order + " ascending"],
|
||||||
["-" + order.replace(" ", ""), "Sort by " + order + " descending"],
|
["-" + order.replace(" ", ""), "Sort by " + order + " descending"]
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ var Map = Class("Map", {
|
|||||||
if (!isObject(args)) // Backwards compatibility :(
|
if (!isObject(args)) // Backwards compatibility :(
|
||||||
args = iter(["motion", "count", "arg", "command"])
|
args = iter(["motion", "count", "arg", "command"])
|
||||||
.map(function ([i, prop]) [prop, this[i]], arguments)
|
.map(function ([i, prop]) [prop, this[i]], arguments)
|
||||||
.toObject()
|
.toObject();
|
||||||
|
|
||||||
let self = this;
|
let self = this;
|
||||||
function repeat() self.action(args)
|
function repeat() self.action(args)
|
||||||
@@ -284,7 +284,7 @@ var MapHive = Class("MapHive", {
|
|||||||
for (let key in events.iterKeys(name)) {
|
for (let key in events.iterKeys(name)) {
|
||||||
state += key;
|
state += key;
|
||||||
if (state !== name)
|
if (state !== name)
|
||||||
states.candidates[state] = (states.candidates[state] || 0) + 1
|
states.candidates[state] = (states.candidates[state] || 0) + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return states;
|
return states;
|
||||||
@@ -330,7 +330,6 @@ var Mappings = Module("mappings", {
|
|||||||
remove: deprecated("mappings.user.remove", function remove(mode, cmd) this.user.remove(mode, cmd)),
|
remove: deprecated("mappings.user.remove", function remove(mode, cmd) this.user.remove(mode, cmd)),
|
||||||
removeAll: deprecated("mappings.user.clear", function removeAll(mode) this.user.clear(mode)),
|
removeAll: deprecated("mappings.user.clear", function removeAll(mode) this.user.clear(mode)),
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a new default key mapping.
|
* Adds a new default key mapping.
|
||||||
*
|
*
|
||||||
@@ -534,7 +533,7 @@ var Mappings = Module("mappings", {
|
|||||||
names: ["-modes", "-mode", "-m"],
|
names: ["-modes", "-mode", "-m"],
|
||||||
type: CommandOption.LIST,
|
type: CommandOption.LIST,
|
||||||
description: "Create this mapping in the given modes",
|
description: "Create this mapping in the given modes",
|
||||||
default: mapmodes || ["n", "v"],
|
default: mapmodes || ["n", "v"]
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
names: ["-nopersist", "-n"],
|
names: ["-nopersist", "-n"],
|
||||||
@@ -693,7 +692,7 @@ var Mappings = Module("mappings", {
|
|||||||
Option.splitList(context.filter);
|
Option.splitList(context.filter);
|
||||||
context.advance(Option._splitAt);
|
context.advance(Option._splitAt);
|
||||||
|
|
||||||
context.compare = CompletionContext.Sort.unsorted
|
context.compare = CompletionContext.Sort.unsorted;
|
||||||
context.completions = [
|
context.completions = [
|
||||||
[buffer.uri.host, "Current Host"],
|
[buffer.uri.host, "Current Host"],
|
||||||
[buffer.uri.spec, "Current Page"]
|
[buffer.uri.spec, "Current Page"]
|
||||||
@@ -788,7 +787,7 @@ var Mappings = Module("mappings", {
|
|||||||
name: name,
|
name: name,
|
||||||
columns: [
|
columns: [
|
||||||
mode == mainMode ? "" : <span highlight="Object" style="padding-right: 1em;">{mode.name}</span>,
|
mode == mainMode ? "" : <span highlight="Object" style="padding-right: 1em;">{mode.name}</span>,
|
||||||
hive.name == "builtin" ? "" : <span highlight="Object" style="padding-right: 1em;">{hive.name}</span>,
|
hive.name == "builtin" ? "" : <span highlight="Object" style="padding-right: 1em;">{hive.name}</span>
|
||||||
],
|
],
|
||||||
__proto__: map
|
__proto__: map
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -140,8 +140,8 @@ var Modes = Module("modes", {
|
|||||||
: "PASS THROUGH (next)"
|
: "PASS THROUGH (next)"
|
||||||
}, {
|
}, {
|
||||||
// Fix me.
|
// Fix me.
|
||||||
preExecute: function (map) { if (modes.main == modes.QUOTE && map.name !== "<C-v>") modes.pop() },
|
preExecute: function (map) { if (modes.main == modes.QUOTE && map.name !== "<C-v>") modes.pop(); },
|
||||||
postExecute: function (map) { if (modes.main == modes.QUOTE && map.name === "<C-v>") modes.pop() },
|
postExecute: function (map) { if (modes.main == modes.QUOTE && map.name === "<C-v>") modes.pop(); },
|
||||||
onKeyPress: function () { if (modes.main == modes.QUOTE) modes.pop() }
|
onKeyPress: function () { if (modes.main == modes.QUOTE) modes.pop() }
|
||||||
});
|
});
|
||||||
this.addMode("IGNORE", { hidden: true }, {
|
this.addMode("IGNORE", { hidden: true }, {
|
||||||
@@ -484,7 +484,7 @@ var Modes = Module("modes", {
|
|||||||
|
|
||||||
mappings.add([modes.MENU], ["<C-[>"],
|
mappings.add([modes.MENU], ["<C-[>"],
|
||||||
"Close the current popup",
|
"Close the current popup",
|
||||||
function () { events.feedkeys("<Esc>") });
|
function () { events.feedkeys("<Esc>"); });
|
||||||
},
|
},
|
||||||
prefs: function () {
|
prefs: function () {
|
||||||
prefs.watch("accessibility.browsewithcaret", modes.closure.onCaretChange);
|
prefs.watch("accessibility.browsewithcaret", modes.closure.onCaretChange);
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ var MOW = Module("mow", {
|
|||||||
const openLink = function openLink(where) {
|
const openLink = function openLink(where) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
dactyl.open(event.target.href, where);
|
dactyl.open(event.target.href, where);
|
||||||
}
|
};
|
||||||
|
|
||||||
if (event.target instanceof HTMLAnchorElement)
|
if (event.target instanceof HTMLAnchorElement)
|
||||||
switch (events.toString(event)) {
|
switch (events.toString(event)) {
|
||||||
@@ -297,7 +297,7 @@ var MOW = Module("mow", {
|
|||||||
else if (res === PASS)
|
else if (res === PASS)
|
||||||
events.feedkeys(command);
|
events.feedkeys(command);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
bind(["j", "<C-e>", "<Down>"], "Scroll down one line",
|
bind(["j", "<C-e>", "<Down>"], "Scroll down one line",
|
||||||
function () { mow.scrollVertical("lines", 1); },
|
function () { mow.scrollVertical("lines", 1); },
|
||||||
@@ -333,10 +333,10 @@ var MOW = Module("mow", {
|
|||||||
function () mow.isScrollable(-1), BEEP);
|
function () mow.isScrollable(-1), BEEP);
|
||||||
|
|
||||||
bind(["gg"], "Scroll to the beginning of output",
|
bind(["gg"], "Scroll to the beginning of output",
|
||||||
function () { mow.scrollToPercent(null, 0); })
|
function () { mow.scrollToPercent(null, 0); });
|
||||||
|
|
||||||
bind(["G"], "Scroll to the end of output",
|
bind(["G"], "Scroll to the end of output",
|
||||||
function () { mow.body.scrollTop = mow.body.scrollHeight; })
|
function () { mow.body.scrollTop = mow.body.scrollHeight; });
|
||||||
|
|
||||||
// copy text to clipboard
|
// copy text to clipboard
|
||||||
bind(["<C-y>"], "Yank selection to clipboard",
|
bind(["<C-y>"], "Yank selection to clipboard",
|
||||||
|
|||||||
@@ -849,7 +849,7 @@ var Options = Module("options", {
|
|||||||
{template.linkifyHelp(map.description)}
|
{template.linkifyHelp(map.description)}
|
||||||
</>)
|
</>)
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
dactyl.addUsageCommand({
|
dactyl.addUsageCommand({
|
||||||
name: ["listo[ptions]", "lo"],
|
name: ["listo[ptions]", "lo"],
|
||||||
|
|||||||
@@ -135,7 +135,6 @@ var actions = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var Addon = Class("Addon", {
|
var Addon = Class("Addon", {
|
||||||
init: function init(addon, list) {
|
init: function init(addon, list) {
|
||||||
this.addon = addon;
|
this.addon = addon;
|
||||||
@@ -249,7 +248,6 @@ var Addon = Class("Addon", {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var AddonList = Class("AddonList", {
|
var AddonList = Class("AddonList", {
|
||||||
init: function init(modules, types, filter) {
|
init: function init(modules, types, filter) {
|
||||||
this.modules = modules;
|
this.modules = modules;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ try {
|
|||||||
Components.utils.import("resource://dactyl/bootstrap.jsm");
|
Components.utils.import("resource://dactyl/bootstrap.jsm");
|
||||||
defineModule("javascript", {
|
defineModule("javascript", {
|
||||||
exports: ["JavaScript", "javascript"],
|
exports: ["JavaScript", "javascript"],
|
||||||
use: ["services", "template", "util"],
|
use: ["services", "template", "util"]
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
// TODO: Clean this up.
|
// TODO: Clean this up.
|
||||||
@@ -18,7 +18,7 @@ var JavaScript = Module("javascript", {
|
|||||||
Local: function (dactyl, modules, window) ({
|
Local: function (dactyl, modules, window) ({
|
||||||
init: function () {
|
init: function () {
|
||||||
this.modules = modules;
|
this.modules = modules;
|
||||||
this.window = window
|
this.window = window;
|
||||||
|
|
||||||
this._stack = [];
|
this._stack = [];
|
||||||
this._functions = [];
|
this._functions = [];
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
|||||||
*/
|
*/
|
||||||
restore: function (branch) {
|
restore: function (branch) {
|
||||||
this.getNames(this.RESTORE + (branch || "")).forEach(function (pref) {
|
this.getNames(this.RESTORE + (branch || "")).forEach(function (pref) {
|
||||||
this.safeSet(pref.substr(this.RESTORE.length), this.get(pref), null, true)
|
this.safeSet(pref.substr(this.RESTORE.length), this.get(pref), null, true);
|
||||||
this.reset(pref);
|
this.reset(pref);
|
||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -605,7 +605,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
|||||||
["1h", "Past hour"],
|
["1h", "Past hour"],
|
||||||
["1d", "Past day"],
|
["1d", "Past day"],
|
||||||
["1w", "Past week"]
|
["1w", "Past week"]
|
||||||
]
|
];
|
||||||
},
|
},
|
||||||
validator: function (value) /^(a(ll)?|s(ession)|\d+[mhdw])$/.test(value)
|
validator: function (value) /^(a(ll)?|s(ession)|\d+[mhdw])$/.test(value)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ var Template = Module("Template", {
|
|||||||
XML.ignoreWhitespace = false; XML.prettyPrinting = false;
|
XML.ignoreWhitespace = false; XML.prettyPrinting = false;
|
||||||
type = type || (/^'.*'$/.test(topic) ? "HelpOpt" :
|
type = type || (/^'.*'$/.test(topic) ? "HelpOpt" :
|
||||||
/^:\w/.test(topic) ? "HelpEx" : "HelpKey");
|
/^:\w/.test(topic) ? "HelpEx" : "HelpKey");
|
||||||
return <a highlight={type} tag={topic} href={"dactyl://help-tag/" + topic} dactyl:command="dactyl.help" xmlns:dactyl={NS}>{text || topic}</a>
|
return <a highlight={type} tag={topic} href={"dactyl://help-tag/" + topic} dactyl:command="dactyl.help" xmlns:dactyl={NS}>{text || topic}</a>;
|
||||||
},
|
},
|
||||||
HelpLink: function (topic) {
|
HelpLink: function (topic) {
|
||||||
if (!services["dactyl:"].initialized)
|
if (!services["dactyl:"].initialized)
|
||||||
@@ -212,7 +212,7 @@ var Template = Module("Template", {
|
|||||||
let tag = (/^'.*'$/.test(topic) ? "o" :
|
let tag = (/^'.*'$/.test(topic) ? "o" :
|
||||||
/^:\w/.test(topic) ? "ex" : "k");
|
/^:\w/.test(topic) ? "ex" : "k");
|
||||||
topic = topic.replace(/^'(.*)'$/, "$1");
|
topic = topic.replace(/^'(.*)'$/, "$1");
|
||||||
return <{tag} xmlns={NS}>{topic}</{tag}>
|
return <{tag} xmlns={NS}>{topic}</{tag}>;
|
||||||
},
|
},
|
||||||
|
|
||||||
// if "processStrings" is true, any passed strings will be surrounded by " and
|
// if "processStrings" is true, any passed strings will be surrounded by " and
|
||||||
@@ -382,7 +382,7 @@ var Template = Module("Template", {
|
|||||||
href={url} path={path} line={frame.lineNumber}
|
href={url} path={path} line={frame.lineNumber}
|
||||||
highlight="URL">{
|
highlight="URL">{
|
||||||
path + ":" + frame.lineNumber
|
path + ":" + frame.lineNumber
|
||||||
}</a>
|
}</a>;
|
||||||
},
|
},
|
||||||
|
|
||||||
table: function table(title, data, indent) {
|
table: function table(title, data, indent) {
|
||||||
|
|||||||
@@ -435,21 +435,21 @@ Controller.prototype = {
|
|||||||
/**
|
/**
|
||||||
* Opens the output message window by echoing a single newline character.
|
* Opens the output message window by echoing a single newline character.
|
||||||
*/
|
*/
|
||||||
openMessageWindow: wrapAssertNoErrors(function() {
|
openMessageWindow: wrapAssertNoErrors(function () {
|
||||||
this.dactyl.dactyl.echo("\n");
|
this.dactyl.dactyl.echo("\n");
|
||||||
}, "Opening message window"),
|
}, "Opening message window"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the current message.
|
* Clears the current message.
|
||||||
*/
|
*/
|
||||||
clearMessage: function() {
|
clearMessage: function () {
|
||||||
this.elements.message.value = ""; // XXX
|
this.elements.message.value = ""; // XXX
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Closes the output message window if open.
|
* Closes the output message window if open.
|
||||||
*/
|
*/
|
||||||
closeMessageWindow: wrapAssertNoErrors(function() {
|
closeMessageWindow: wrapAssertNoErrors(function () {
|
||||||
for (let i = 0; i < 15 && !this.elements.multilineContainer.collapsed; i++)
|
for (let i = 0; i < 15 && !this.elements.multilineContainer.collapsed; i++)
|
||||||
this.controller.keypress(null, "VK_ESCAPE", {});
|
this.controller.keypress(null, "VK_ESCAPE", {});
|
||||||
this.assertMessageWindowOpen(false, "Clearing message window failed");
|
this.assertMessageWindowOpen(false, "Clearing message window failed");
|
||||||
|
|||||||
Reference in New Issue
Block a user