blob: 625c20383572d592a1605c92dbe38797e375520e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<div class="post-comment" data-comment="disqus">
<span class="post-comment-notloaded">
<i class="iconfont icon-chatbox-ellipses-sharp"></i> {{ i18n "postComment" }}
</span>
<div id="disqus_thread" style="display: none;"></div>
<script>
function loadComment() {
var commentArea = document.querySelector('.post-comment');
var disqus_config = function () {
this.page.url = '{{ .Permalink }}';
this.page.identifier = '{{ .File.ContentBaseName }}';
};
var s = document.createElement('script');
s.src = 'https://' + '{{ .Site.Params.disqusShortname }}' + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
document.querySelector('#disqus_thread').removeAttribute('style');
(document.body || document.head).appendChild(s);
document.querySelector('span.post-comment-notloaded').setAttribute('style', 'display: none;');
}
</script>
</div>
|