Skip to content

Commit 4eb0213

Browse files
committed
fix: 修改百度统计实现方式,直接在HTML中加载
1 parent 4619e22 commit 4eb0213

File tree

3 files changed

+9
-37
lines changed

3 files changed

+9
-37
lines changed

index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
<link rel="icon" type="image/png" href="/favicon.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>爬虫技术挑战平台</title>
8+
<script>
9+
var _hmt = _hmt || [];
10+
(function() {
11+
var hm = document.createElement("script");
12+
hm.src = "https://hm.baidu.com/hm.js?b4fcc22834ded2c9864e661e6a5a634d";
13+
var s = document.getElementsByTagName("script")[0];
14+
s.parentNode.insertBefore(hm, s);
15+
})();
16+
</script>
817
</head>
918
<body>
1019
<div id="root"></div>

src/App.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ import GitHubRibbon from './components/GitHubRibbon'
1010
import PageTitle from './components/PageTitle'
1111
import './gh-fork-ribbon.css';
1212
import './styles/github-ribbon-fix.css';
13-
import BaiduAnalytics from './components/BaiduAnalytics'
1413

1514
const App = () => {
1615
return (
1716
<Router>
1817
<div className="App">
1918
<PageTitle />
2019
<GitHubRibbon repositoryUrl="https://github.com/JSREP/crawler-leetcode" />
21-
<BaiduAnalytics siteId="b4fcc22834ded2c9864e661e6a5a634d" />
2220
<NavBar/>
2321
<div className="content-wrapper" style={{ padding: '20px 0' }}>
2422
<Routes>

src/components/BaiduAnalytics.tsx

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)