fix comments feature
This commit is contained in:
@@ -57,6 +57,12 @@
|
|||||||
// facebook-like distraction free mode
|
// facebook-like distraction free mode
|
||||||
distractionFreeMode: false
|
distractionFreeMode: false
|
||||||
})
|
})
|
||||||
|
// 监听URL中hash的变化,如果发现换了一个MD文件,那么刷新页面,解决整个网站使用一个gitalk评论issues的问题。
|
||||||
|
window.onhashchange = function(event){
|
||||||
|
if(event.newURL.split('?')[0] !== event.oldURL .split('?')[0]) {
|
||||||
|
location.reload()
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user