We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05bfdd1 commit dfabac8Copy full SHA for dfabac8
text/.vuepress/enhanceApp.js
@@ -7,6 +7,9 @@ function updateGiscus(path) {
7
);
8
}
9
10
+function getPath(pathWithHash) {
11
+ return pathWithHash.split('#')[0]
12
+}
13
function addHistoryEvent() {
14
const _historyWrap = function(type) {
15
const orig = history[type];
@@ -23,11 +26,11 @@ function addHistoryEvent() {
23
26
24
27
window.addEventListener('pushState', function(e) {
25
28
console.log('change pushState', e);
- updateGiscus(e.arguments[2])
29
+ updateGiscus(getPath(e.arguments[2]))
30
});
31
window.addEventListener('replaceState', function(e) {
32
console.log('change replaceState', e);
33
34
35
36
0 commit comments