diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2015-03-19 22:42:40 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2015-03-19 22:42:40 +0100 |
commit | e90c342c6b3487840f0b7067fd2ed04678d00db3 (patch) | |
tree | b27c61028e350e85170b5a3b13cf77188c24da4e /theme/templates/article.html | |
parent | 0ad73de1d89956739738716f2d32652ca83164b5 (diff) |
Do not load disqus comment automaticaly
Diffstat (limited to 'theme/templates/article.html')
-rwxr-xr-x | theme/templates/article.html | 23 |
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 %} |