Update Disqus embed code
diff --git a/templates/article.html b/templates/article.html
index 505c886..62484ad 100644
--- a/templates/article.html
+++ b/templates/article.html
@@ -52,13 +52,15 @@
</div>
<script type="text/javascript">
- var disqus_identifier = "{{ article.url }}";
- loadDisqus = function() {
- var dsq = document.createElement('script');
- dsq.type = 'text/javascript';
- dsq.async = true;
- dsq.src = 'https://{{ DISQUS_SITENAME }}.disqus.com/embed.js';
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ var disqus_config = function () {
+ this.page.identifier = "{{ article.url }}";
+ this.page.title = "{{ article.title }}";
+ };
+ loadDisqus = function(sitename) {
+ var d = document, s = d.createElement('script');
+ s.src = 'https://{{ DISQUS_SITENAME }}.disqus.com/embed.js';
+ s.setAttribute('data-timestamp', +new Date());
+ (d.head || d.body).appendChild(s);
};
{% if not DISQUS_COLLAPSED %}
loadDisqus();