From f02b74ea80e9688a942ad22e22f4e8f3fe523f7b Mon Sep 17 00:00:00 2001 From: ruanyf Date: Sat, 26 Apr 2014 01:25:01 +0800 Subject: [PATCH] edit ditto.js --- js/ditto.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/js/ditto.js b/js/ditto.js index f9cbeb4..0bb3368 100644 --- a/js/ditto.js +++ b/js/ditto.js @@ -195,6 +195,9 @@ function router() { path = path + ".md"; } + window.disqus_identifier=location.hash; + window.disqus_url='http://'+location.host+'?'+location.hash.replace("#", ""); + // otherwise get the markdown and render it var loading = show_loading(); $.get(path , function(data) { @@ -208,16 +211,6 @@ function router() { normalize_paths(); create_page_anchors(); - if(window.DISQUS){ - DISQUS.reset({ - reload: true, - config: function () { - window.disqus_identifier = location.hash; - window.disqus_url = location.href; - } - }); - } - $('#content code').map(function() { Prism.highlightElement(this); });