Skip to content

Commit

Permalink
docs: add hm script
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Nov 29, 2018
1 parent b36c663 commit b3a050a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
</style>
<script>
var _hmt = _hmt || [];
var isGithub = location.host.indexOf('github') !== -1;
var src = isGithub ? 'https://hm.baidu.com/hm.js?b3ef688fa86bfb75027f1b410180a867' : 'https://hm.baidu.com/hm.js?1564b57c5b8f74933e4fedca9dc75b0d';
(function() {
const hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?b3ef688fa86bfb75027f1b410180a867'
const s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
var hm = document.createElement('script');
hm.src = src;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})()
</script>
</head>
Expand Down Expand Up @@ -50,4 +52,4 @@
</script>
</body>

</html>
</html>

0 comments on commit b3a050a

Please sign in to comment.