edit js/ditto

This commit is contained in:
ruanyf
2014-04-29 10:21:51 +08:00
parent 293fe6229a
commit 23ddcbebee
+6 -6
View File
@@ -170,6 +170,11 @@ function show_loading() {
}
function router() {
$('html, body').animate({
scrollTop: $('#content').offset().top
}, 200);
var path = location.hash.replace("#", "./");
// default page if hash is empty
@@ -196,6 +201,7 @@ function router() {
normalize_paths();
create_page_anchors();
// 完成代码高亮
$('#content code').map(function() {
Prism.highlightElement(this);
});
@@ -216,12 +222,6 @@ function router() {
})();
})();
if(path.indexOf('README') === -1){
$('html, body').animate({
scrollTop: $('#content').offset().top
}, 200);
}
}).fail(function() {
show_error();