This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
mystic/themes/hueman/layout/comment/disqus.ejs
2018-09-03 17:41:16 +10:00

22 lines
894 B
Plaintext

<% if (typeof(script) !== 'undefined' && script) { %>
<script>
var disqus_shortname = '<%= theme.comment.disqus %>';
<% if (page.disqusId) { %>
var disqus_identifier = '<%= page.disqusId || page.slug %>';
<% } %>
<% if (page.permalink) { %>
var disqus_url = '<%= page.permalink %>';
<% } %>
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/<% if (page.comments) { %>embed.js<% } else { %>count.js<% } %>';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<% } else { %>
<div id="disqus_thread">
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
<% } %>