diff --git a/js/ditto.js b/js/ditto.js index c02b696..3bc25a0 100644 --- a/js/ditto.js +++ b/js/ditto.js @@ -26,9 +26,9 @@ var disqusCode = '

留言

' + " })();" + ''; -var disqus_identifier = location.hash; -var disqus_title = document.title; -var disqus_url = location.href; +var disqus_identifier; +var disqus_title; +var disqus_url; function initialize() { // initialize sidebar and buttons @@ -195,6 +195,10 @@ function router() { path = path + ".md"; } + disqus_identifier = location.hash; + disqus_title = $(ditto.content_id+" h1").text(); + disqus_url = location.href; + // otherwise get the markdown and render it var loading = show_loading(); $.get(path , function(data) {