-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
43 lines (41 loc) · 1.49 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="icon" href="/static/favicon.png">
<link rel="apple-touch-icon" href="/static/favicon.png">
<title>Hi汇文</title>
<script>
;(function() {
// detect browser version, redirect if found an unhealthy version
if (window.navigator) {
var ua = String(window.navigator.userAgent)
var chrome = /(?:Chrome|CriOS)\/(\d+)\./.exec(ua)
var safari = /Safari/.exec(ua) ? /Version\/(\d+)\./.exec(ua) : null
var firefox = /Firefox\/(\d+)\./.exec(ua)
var edge = /Edge\/(\d+)\./.exec(ua)
var appleWebkit = /AppleWebKit\/(\d+)\./.exec(ua)
function isAcceptable() {
return (
( chrome && Number(chrome[1]) >= 56 )
|| ( safari && Number(safari[1]) >= 10 )
|| ( firefox && Number(firefox[1]) >= 50 )
|| ( edge && Number(edge[1]) >= 13 )
|| ( appleWebkit && Number(appleWebkit[1]) >= 602 )
)
}
if ( ! isAcceptable() ) {
window.location.href = "/static/browser-warning.html"
}
} else {
// must be really ancient one
document.write('<div><h1>请使用最新版Chrome访问</h1><a href="https://www.google.cn/chrome/">下载链接1</a> <a href="http://rj.baidu.com/soft/detail/25718.html">下载链接2</a></div>')
}
})();
</script>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>