Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce7f3ab

Browse files
committed
2020-11-23 13:24:28
1 parent eafda77 commit ce7f3ab

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

asset/docsify-baidu-stat.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
(function(){
2+
var plugin = function(hook) {
3+
hook.doneEach(function() {
4+
window._hmt = window._hmt || []
5+
var hm = document.createElement("script")
6+
hm.src = "https://hm.baidu.com/hm.js?" + window.$docsify.bdStatId
7+
document.querySelector("article").appendChild(hm)
8+
})
9+
}
10+
var plugins = window.$docsify.plugins || []
11+
plugins.push(plugin)
12+
window.$docsify.plugins = plugins
13+
})()

index.html

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@
1313
<!-- google ads -->
1414
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
1515

16-
<!-- baidu stats -->
17-
<script>
18-
var _hmt = _hmt || [];
19-
(function() {
20-
var hm = document.createElement("script");
21-
hm.src = "https://hm.baidu.com/hm.js?fe69a91589265331354f0dfebd6c932b";
22-
var s = document.getElementsByTagName("script")[0];
23-
s.parentNode.insertBefore(hm, s);
24-
})();
25-
</script>
26-
2716
<!-- google webmaster -->
2817
<meta name="google-site-verification" content="pyo9N70ZWyh8JB43bIu633mhxesJ1IcwWCZlM3jUfFo" />
2918
</head>
@@ -68,6 +57,7 @@
6857
themeColor: '#e51837',
6958
repo: 'apachecn/feature-engineering-for-ml-zh',
7059
plugins: [window.docsPlugin],
60+
bdStatId: '38525fdac4b5d4403900b943d4e7dd91',
7161
search: {
7262
paths: 'auto',
7363
placeholder: '搜索',
@@ -86,5 +76,6 @@
8676
<script src="asset/prism-python.min.js"></script>
8777
<script src="asset/docsify-copy-code.min.js"></script>
8878
<script src="asset/docsify-baidu-push.js"></script>
79+
<script src="asset/docsify-baidu-stat.js"></script>
8980
</body>
9081
</html>

0 commit comments

Comments
 (0)