1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 23:32:26 +01:00

Fix help reference linkification in MOW.

This commit is contained in:
Doug Kearns
2012-09-05 00:56:58 +10:00
parent 1e2052c0d9
commit 266c86a9d1
3 changed files with 5 additions and 22 deletions

View File

@@ -771,7 +771,9 @@ var Mappings = Module("mappings", {
format: {
description: function (map) (XML.ignoreWhitespace = false, XML.prettyPrinting = false, <>
{options.get("passkeys").has(map.name)
? <span highlight="URLExtra">(passed by {template.helpLink("'passkeys'")})</span>
? <span highlight="URLExtra">
({template.linkifyHelp(_("option.passkeys.passedBy"))})
</span>
: <></>}
{template.linkifyHelp(map.description + (map.rhs ? ": " + map.rhs : ""))}
</>),
@@ -779,7 +781,7 @@ var Mappings = Module("mappings", {
char === "n" ? map.name : char ? char + "_" + map.name : "",
headings: ["Command", "Mode", "Group", "Description"]
}
}
};
dactyl.addUsageCommand({
__proto__: args,

View File

@@ -233,7 +233,7 @@ var Help = Module("Help", {
init: function init() {
dactyl.commands["dactyl.help"] = function (event) {
let elem = event.originalTarget;
help.help(elem.getAttribute("tag") || elem.textContent);
modules.help.help(elem.getAttribute("tag") || elem.textContent);
};
},

View File

@@ -1068,25 +1068,6 @@ var Options = Module("options", {
commands: function initCommands(dactyl, modules, window) {
const { commands, contexts, options } = modules;
let args = {
getMode: function (args) findMode(args["-mode"]),
iterate: function (args) {
for (let map in mappings.iterate(this.getMode(args)))
for (let name in values(map.names))
yield { name: name, __proto__: map };
},
format: {
description: function (map) (XML.ignoreWhitespace = false, XML.prettyPrinting = false, <>
{options.get("passkeys").has(map.name)
? <span highlight="URLExtra">({
tempate.linkifyHelp(_("option.passkeys.passedBy"))
})</span>
: <></>}
{template.linkifyHelp(map.description)}
</>)
}
};
dactyl.addUsageCommand({
name: ["listo[ptions]", "lo"],
description: "List all options along with their short descriptions",