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:
parent
5d0454a7cd
commit
c2dfee8c9c
@ -16,7 +16,7 @@ var ditto = {
|
||||
run: initialize
|
||||
};
|
||||
|
||||
var disqusCode = '<div id="disqus_thread"></div>'
|
||||
var disqusCode = '<h3>留言</h3><div id="disqus_thread"></div>'
|
||||
+ '<script type="text/javascript">'
|
||||
+ "var disqus_shortname = 'es6'; "
|
||||
+ "(function() {"
|
||||
@ -26,6 +26,7 @@ var disqusCode = '<div id="disqus_thread"></div>'
|
||||
+ " })();"
|
||||
+ '</script>';
|
||||
|
||||
var disqus_identifier;
|
||||
|
||||
function initialize() {
|
||||
// initialize sidebar and buttons
|
||||
@ -181,6 +182,8 @@ function show_loading() {
|
||||
function router() {
|
||||
var path = location.hash.replace("#", "./");
|
||||
|
||||
disqus_identifier = path;
|
||||
|
||||
// default page if hash is empty
|
||||
if (location.pathname === "/index.html") {
|
||||
path = location.pathname.replace("index.html", ditto.index);
|
||||
|
Loading…
x
Reference in New Issue
Block a user