From 2dc1d8f91ea33cbcb4cc373ccd79e948971ce4f3 Mon Sep 17 00:00:00 2001 From: ruanyf Date: Sat, 26 Apr 2014 01:51:54 +0800 Subject: [PATCH] edit ditto.js --- js/ditto.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ditto.js b/js/ditto.js index f6ddc59..e03d8e8 100644 --- a/js/ditto.js +++ b/js/ditto.js @@ -28,7 +28,7 @@ var disqusCode = '

留言

' var disqus_identifier=location.hash; var disqus_title; -var disqus_url='http://'+location.host+'/'+location.hash.replace("#", ""); +var disqus_url='http://'+location.host+'/'+location.hash?location.hash.replace("#", ""):'index'; function initialize() { // initialize sidebar and buttons @@ -196,7 +196,7 @@ function router() { } window.disqus_identifier=location.hash; - window.disqus_url='http://'+location.host+'/'+location.hash.replace("#", ""); + window.disqus_url='http://'+location.host+'/'+location.hash?location.hash.replace("#", ""):'index'; // otherwise get the markdown and render it var loading = show_loading();