summaryrefslogtreecommitdiff
path: root/common/content
diff options
context:
space:
mode:
authorKris Maglione <kris@vimperator.org>2009-10-24 16:49:21 -0400
committerKris Maglione <kris@vimperator.org>2009-10-24 16:49:21 -0400
commit2c1f7316a6d3ddb95d399b28dd35b3a377729fae (patch)
treec67f2def4ac97ef052f644763cd773c5d0d26913 /common/content
parent8b222085ec42fbebf8ac21ffbe23548ee7ecd37d (diff)
downloadpentadactyl-2c1f7316a6d3ddb95d399b28dd35b3a377729fae.tar.gz
Add machinery to allow app-specific help files.
--HG-- branch : xslt
Diffstat (limited to 'common/content')
-rw-r--r--common/content/help.xsl8
-rw-r--r--common/content/liberator.js1
2 files changed, 8 insertions, 1 deletions
diff --git a/common/content/help.xsl b/common/content/help.xsl
index 7736d18c..ecca718b 100644
--- a/common/content/help.xsl
+++ b/common/content/help.xsl
@@ -11,7 +11,7 @@
<xsl:output method="xml"/>
<xsl:variable name="local" select="concat('chrome://&liberator.name;/locale/', /liberator:document/@name, '.xml')"/>
- <xsl:variable name="localdoc" select="document($local)/liberator:document"/>
+ <xsl:variable name="localdoc" select="document($local)/liberator:overlay"/>
<xsl:template match="liberator:document">
<html:html liberator:highlight="Help">
@@ -156,6 +156,12 @@
</xsl:for-each>
</xsl:template>
+ <xsl:template match="liberator:document/liberator:tags|liberator:document/liberator:tag">
+ <xsl:call-template name="splice-locals">
+ <xsl:with-param name="tag" select="substring-before(concat(., ' '), ' ')"/>
+ <xsl:with-param name="elem" select="self::node()"/>
+ </xsl:call-template>
+ </xsl:template>
<xsl:template match="liberator:document/*[liberator:tags]">
<xsl:call-template name="splice-locals">
<xsl:with-param name="tag" select="substring-before(concat(liberator:tags, ' '), ' ')"/>
diff --git a/common/content/liberator.js b/common/content/liberator.js
index def9fd12..5f004568 100644
--- a/common/content/liberator.js
+++ b/common/content/liberator.js
@@ -1724,6 +1724,7 @@ const liberator = (function () //{{{
let start = Date.now();
liberator.log("Initializing liberator object...", 0);
+ services.get("liberator:").helpNamespaces = [config.name.toLowerCase(), "liberator"];
services.get("liberator:").helpFiles = config.helpFiles.map(function (f) f.replace(/\..*/, ""));
config.features.push(getPlatformFeature());