aboutsummaryrefslogtreecommitdiff
path: root/theme/templates/article.html
diff options
context:
space:
mode:
Diffstat (limited to 'theme/templates/article.html')
-rwxr-xr-xtheme/templates/article.html23
1 files changed, 15 insertions, 8 deletions
diff --git a/theme/templates/article.html b/theme/templates/article.html
index 976041a..5b366e0 100755
--- a/theme/templates/article.html
+++ b/theme/templates/article.html
@@ -64,15 +64,22 @@
</ul>
{% endif %}
</div>
- <script type="text/javascript">
- var disqus_identifier = "{{ article.url }}";
- (function() {
- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
- dsq.src = '//{{ DISQUS_SITENAME }}.disqus.com/embed.js';
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
- })();
- </script>
</div>
+ <div id="disqus_comments">
+ <button onclick="load_disqus()">recharger</button>
+ </div>
+ <script type="text/javascript">
+ var disqus_identifier = "{{ article.url }}";
+ function load_disqus() {
+ var dsq = document.createElement('script');
+ dsq.type = 'text/javascript';
+ dsq.async = true;
+ dsq.src = '//{{ DISQUS_SITENAME }}.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ var load_button = document.getElementById('disqus_comments');
+ load_button.parentNode.removeChild(load_button);
+ };
+ </script>
{% endif %}
{% endblock %}