diff options
author | Daniel Gruno <humbedooh@apache.org> | 2012-05-08 17:08:07 +0200 |
---|---|---|
committer | Daniel Gruno <humbedooh@apache.org> | 2012-05-08 17:08:07 +0200 |
commit | 132c26c8732141e5156cb0684762821017917cdd (patch) | |
tree | bba3cee6e752f4384c134fc699986e39ce7fbd7a /docs/manual/style | |
parent | Testing nd's suggestion on using document.write (diff) | |
download | apache2-132c26c8732141e5156cb0684762821017917cdd.tar.xz apache2-132c26c8732141e5156cb0684762821017917cdd.zip |
placeholder for disqus thread is now created using javascript.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1335568 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/style')
-rw-r--r-- | docs/manual/style/xsl/common.xsl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/docs/manual/style/xsl/common.xsl b/docs/manual/style/xsl/common.xsl index 70f4500211..35de2f007d 100644 --- a/docs/manual/style/xsl/common.xsl +++ b/docs/manual/style/xsl/common.xsl @@ -294,23 +294,22 @@ <h2><a name="comments_section" id="comments_section"><xsl:value-of select="$message[@id='comments']" /></a></h2> <div class="warning"><strong>This section is experimental!</strong><br/>Comments placed here should not be expected to last beyond the testing phase of this system, nor do we in any way guarantee that we'll read them.</div>&lf; -<div id="disqus_thread">&lf;</div> <script type="text/javascript"> <xsl:text disable-output-escaping="yes"><![CDATA[<!--//--><![CDATA[//><!--]]></xsl:text> -var lang = '<xsl:value-of select="$doclang"/>';<![CDATA[ +var lang = '<xsl:value-of select="$doclang"/>'; var disqus_shortname = 'httpd'; var disqus_identifier = window.location.href.replace(/(current|trunk)/, "2.4").replace(/\/[a-z]{2}\//, "/").replace(window.location.protocol, "http:") + '.' + lang; if (disqus_identifier.indexOf("httpd.apache.org") != -1) { + document.write('<div id="disqus_thread"></div>'); (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = window.location.protocol + '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); } else { - var text = document.createTextNode("Comments have been disabled for offline viewing."); - document.getElementById('disqus_thread').appendChild(text); + document.write("Comments have been disabled for offline viewing."); } -]]><xsl:text disable-output-escaping="yes"><![CDATA[//--><!]]]]>></xsl:text></script> +<xsl:text disable-output-escaping="yes"><![CDATA[//--><!]]]]>></xsl:text></script> </div> </xsl:when> </xsl:choose> |