From dfce3f7f28ef37f0685c028c8419dbd6c2ed7f17 Mon Sep 17 00:00:00 2001 From: ruanyf Date: Sat, 26 Apr 2014 01:14:57 +0800 Subject: [PATCH] edit ditto.js --- js/ditto.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ditto.js b/js/ditto.js index 1326bf3..b0dc1b2 100644 --- a/js/ditto.js +++ b/js/ditto.js @@ -208,13 +208,15 @@ function router() { normalize_paths(); create_page_anchors(); - DISQUS.reset({ + if(window.DISQUS){ + DISQUS.reset({ reload: true, config: function () { this.page.identifier = location.hash; this.page.url = location.href; } }); + } $('#content code').map(function() { Prism.highlightElement(this);