mirror of
https://github.com/tangkunyin/hexo-theme-jsimple.git
synced 2026-01-25 14:56:28 +00:00
20 lines
882 B
Plaintext
20 lines
882 B
Plaintext
<% if (theme.comments.enable){ %>
|
|
<% if (theme.comments.shortname) { %>
|
|
<div id="disqus_thread"></div>
|
|
<script>
|
|
if (location.origin === '<%= config.url %>') {
|
|
var disqus_config = function () {
|
|
this.page.url = location.href;
|
|
this.page.identifier = location.pathname;
|
|
};
|
|
(function() {
|
|
var d = document, s = d.createElement('script');
|
|
s.src = 'https://<%=theme.comments.shortname %>.disqus.com/embed.js';
|
|
s.setAttribute('data-timestamp', +new Date());
|
|
(d.head || d.body).appendChild(s);
|
|
})();
|
|
}
|
|
</script>
|
|
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
|
<% } %>
|
|
<% } %> |