1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-17 00:15:46 +01:00

Don't force help initialization until we see something that looks like a help link. Other small interface changes.

This commit is contained in:
Kris Maglione
2011-01-21 05:27:15 -05:00
parent 2af9754509
commit d71320aa09
8 changed files with 68 additions and 47 deletions

View File

@@ -80,6 +80,9 @@ var Template = Module("Template", {
},
helpLink: function (topic, text, type) {
if (!services["dactyl:"].initialized)
util.dactyl.initHelp();
if (services["dactyl:"].initialized && !set.has(services["dactyl:"].HELP_TAGS, topic))
return <span highlight={type || ""}>{text || topic}</span>;
@@ -89,6 +92,9 @@ var Template = Module("Template", {
return <a highlight={type} tag={topic} href={"dactyl://help-tag/" + topic} dactyl:command="dactyl.help" xmlns:dactyl={NS}>{text || topic}</a>
},
HelpLink: function (topic) {
if (!services["dactyl:"].initialized)
util.dactyl.initHelp();
if (services["dactyl:"].initialized && !set.has(services["dactyl:"].HELP_TAGS, topic))
return <>{topic}</>;
@@ -220,8 +226,6 @@ var Template = Module("Template", {
},
linkifyHelp: function linkifyHelp(str, help) {
util.dactyl.initHelp();
let re = util.regexp(<![CDATA[
([/\s]|^)
( '[\w-]+' | :(?:[\w-]+|!) | (?:._)?<[\w-]+> )