mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 23:42:27 +01:00
Fix help reference linkification in MOW.
This commit is contained in:
@@ -771,7 +771,9 @@ var Mappings = Module("mappings", {
|
|||||||
format: {
|
format: {
|
||||||
description: function (map) (XML.ignoreWhitespace = false, XML.prettyPrinting = false, <>
|
description: function (map) (XML.ignoreWhitespace = false, XML.prettyPrinting = false, <>
|
||||||
{options.get("passkeys").has(map.name)
|
{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 : ""))}
|
{template.linkifyHelp(map.description + (map.rhs ? ": " + map.rhs : ""))}
|
||||||
</>),
|
</>),
|
||||||
@@ -779,7 +781,7 @@ var Mappings = Module("mappings", {
|
|||||||
char === "n" ? map.name : char ? char + "_" + map.name : "",
|
char === "n" ? map.name : char ? char + "_" + map.name : "",
|
||||||
headings: ["Command", "Mode", "Group", "Description"]
|
headings: ["Command", "Mode", "Group", "Description"]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
dactyl.addUsageCommand({
|
dactyl.addUsageCommand({
|
||||||
__proto__: args,
|
__proto__: args,
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ var Help = Module("Help", {
|
|||||||
init: function init() {
|
init: function init() {
|
||||||
dactyl.commands["dactyl.help"] = function (event) {
|
dactyl.commands["dactyl.help"] = function (event) {
|
||||||
let elem = event.originalTarget;
|
let elem = event.originalTarget;
|
||||||
help.help(elem.getAttribute("tag") || elem.textContent);
|
modules.help.help(elem.getAttribute("tag") || elem.textContent);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1068,25 +1068,6 @@ var Options = Module("options", {
|
|||||||
commands: function initCommands(dactyl, modules, window) {
|
commands: function initCommands(dactyl, modules, window) {
|
||||||
const { commands, contexts, options } = modules;
|
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({
|
dactyl.addUsageCommand({
|
||||||
name: ["listo[ptions]", "lo"],
|
name: ["listo[ptions]", "lo"],
|
||||||
description: "List all options along with their short descriptions",
|
description: "List all options along with their short descriptions",
|
||||||
|
|||||||
Reference in New Issue
Block a user