From f731ea151c8e88b3d7c58a78332e08e485ce33ca Mon Sep 17 00:00:00 2001 From: ruanyf Date: Sat, 26 Apr 2014 02:17:08 +0800 Subject: [PATCH] edit ditto.js --- js/ditto.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/ditto.js b/js/ditto.js index 3cf0728..87c3f4a 100644 --- a/js/ditto.js +++ b/js/ditto.js @@ -18,9 +18,9 @@ var ditto = { var disqusCode = '

留言

'; -var disqus_identifier; -var disqus_title; -var disqus_url; +var disqus_identifier=location.hash?location.hash:'index'; +var disqus_title=document.title; +var disqus_url='http://'+location.host+'/'+location.hash.replace("#", ""); function initialize() { // initialize sidebar and buttons @@ -204,6 +204,7 @@ function router() { reload: true, config: function () { window.disqus_identifier = location.hash; + window.disqus_title = document.title; window.disqus_url = 'http://'+location.host+'/'+location.hash.replace("#", ""); } });