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
2b76df168d
commit
f02b74ea80
13
js/ditto.js
13
js/ditto.js
@ -195,6 +195,9 @@ function router() {
|
|||||||
path = path + ".md";
|
path = path + ".md";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.disqus_identifier=location.hash;
|
||||||
|
window.disqus_url='http://'+location.host+'?'+location.hash.replace("#", "");
|
||||||
|
|
||||||
// otherwise get the markdown and render it
|
// otherwise get the markdown and render it
|
||||||
var loading = show_loading();
|
var loading = show_loading();
|
||||||
$.get(path , function(data) {
|
$.get(path , function(data) {
|
||||||
@ -208,16 +211,6 @@ function router() {
|
|||||||
normalize_paths();
|
normalize_paths();
|
||||||
create_page_anchors();
|
create_page_anchors();
|
||||||
|
|
||||||
if(window.DISQUS){
|
|
||||||
DISQUS.reset({
|
|
||||||
reload: true,
|
|
||||||
config: function () {
|
|
||||||
window.disqus_identifier = location.hash;
|
|
||||||
window.disqus_url = location.href;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#content code').map(function() {
|
$('#content code').map(function() {
|
||||||
Prism.highlightElement(this);
|
Prism.highlightElement(this);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user