1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

edit ditto.js

This commit is contained in:
ruanyf 2014-04-26 09:25:40 +08:00
parent 011ead40e3
commit ea2074e8b8

View File

@ -203,13 +203,14 @@ function router() {
function loadDisqus() { function loadDisqus() {
// http://docs.disqus.com/help/2/ // http://docs.disqus.com/help/2/
window.disqus_shortname = 'es6'; window.disqus_shortname = 'es6';
window.disqus_identifier = location.hash; window.disqus_identifier = location.hash?location.hash.replace("#", ""):'index';
window.disqus_title =$(ditto.content_id+" h1").text();
window.disqus_url = 'http://es6.ruanyifeng.com/' + location.hash?location.hash.replace("#", ""):'index'; window.disqus_url = 'http://es6.ruanyifeng.com/' + location.hash?location.hash.replace("#", ""):'index';
// http://docs.disqus.com/developers/universal/ // http://docs.disqus.com/developers/universal/
(function() { (function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://es6.disqus.com/embed.js'; dsq.src = 'http://es6.disqus.com/embed.js?'+Date.now();
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})(); })();
} }