Skip to content

Commit 1224528

Browse files
committed
fix pv stats
1 parent 96c7f6b commit 1224528

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

layouts/post.shtml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,6 @@
1212
<ctx :if="$page.custom.getOr('mermaid', false)">
1313
<script defer src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/mermaid/8.14.0/mermaid.min.js" onload="mermaid.initialize({startOnLoad:true});"></script>
1414
</ctx>
15-
<script>
16-
var _hmt = _hmt || [];
17-
(function() {
18-
var hm = document.createElement("script");
19-
hm.src = "https://hm.baidu.com/hm.js?c7ddb41bcae30e6c2acc86e2cbe8b753";
20-
var s = document.getElementsByTagName("script")[0];
21-
s.parentNode.insertBefore(hm, s);
22-
})();
23-
24-
const payload = {
25-
'ns': 'zigcc',
26-
'url': document.location.href,
27-
'title': document.title,
28-
'referrer': window.frames.top.document.referrer,
29-
};
30-
fetch('https://en.liujiacai.net/pv/write?' + new URLSearchParams(payload),
31-
{mode: 'no-cors'}).catch(console.log);
32-
</script>
33-
3415
</head>
3516
<body id="body">
3617
<div :html="$page.content()"></div>

layouts/templates/base.shtml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@
77
<title :text="$site.title"></title>
88
<link type="text/css" rel="stylesheet" href="$site.asset('style.css').link()">
99
<link type="text/css" rel="stylesheet" href="$site.asset('highlight.css').link()">
10+
<script>
11+
var _hmt = _hmt || [];
12+
(function() {
13+
var hm = document.createElement("script");
14+
hm.src = "https://hm.baidu.com/hm.js?c7ddb41bcae30e6c2acc86e2cbe8b753";
15+
var s = document.getElementsByTagName("script")[0];
16+
s.parentNode.insertBefore(hm, s);
17+
})();
18+
19+
const payload = {
20+
'ns': 'zigcc',
21+
'url': document.location.href,
22+
'title': document.title,
23+
'referrer': window.frames.top.document.referrer,
24+
};
25+
fetch('https://en.liujiacai.net/pv/write?' + new URLSearchParams(payload),
26+
{mode: 'no-cors'}).catch(console.log);
27+
</script>
28+
1029
<super>
1130
</head>
1231
<body id="body">

0 commit comments

Comments
 (0)