-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path404.html
More file actions
76 lines (76 loc) · 2.65 KB
/
404.html
File metadata and controls
76 lines (76 loc) · 2.65 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
---
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<title>404 - 瑞兽谷</title>
<style>
body{
margin: 30px 0 3px
}
a:not(:hover){
text-decoration: none
}
.img430x640{
max-width: 100%;
max-height: calc(100vh - 45px - 3em);
margin: auto;
pointer-events: none;
}
#report-stat:after{
content: '正在反馈此错误...'
}
#report-stat.develop:after{
content: '识别为开发环境,已禁用反馈。'
}
#report-stat.success:after{
color: #0b0;
content: '错误已成功反馈,谢谢您的支持';
}
#report-stat.fail:after{
color: #f00;
content: '无法反馈错误,请关闭广告插件'
}
</style>
</head>
<body>
<div id="page" style="text-align: center">
<div>您超越了边界。<a href="/" target="_top">返回瑞兽谷</a></div>
<noscript><div style="color:green">或许只要您打开 JavaScript 就可以恢复正常。来试试看吧!</div></noscript>
<div id="report-stat"></div>
<img class="img430x640" src="https://cdn.jsdelivr.net/gh/LEORChn/LEORChn.github.io/img/404_1.png">
<div>Source: <a target="_blank" href="https://twitter.com/foxperia/status/1059448027042078720">Twitter</a></div>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-174341933-1"></script>
<script src="/js/baseLib.js"></script>
<script src="/js/http.js"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
var redirect_table = jsonify_fix('{{ site.data.redirect | jsonify }}');
var redirectTableUrl = location.pathname.replace(/(\/+)$/, '').toLowerCase(); // 有些人可能无法区分大小写或者习惯在末尾加斜杠,这句用来保证这些情况都能匹配
if(redirectTableUrl in redirect_table){
location.pathname = redirect_table[redirectTableUrl];
}else if(location.host.startsWith('127.0.0.') || location.host.startsWith('192.168.')){
$('#report-stat').className = 'develop';
}else{
gtag('js', new Date());
gtag('config', 'UA-174341933-1');
gtag('config', 'G-8FET0HN743');
gtag('event', 'exception', {
'description': '404',
'fatal': true
});
http('get https://www.googletagmanager.com/gtag/js?id=UA-174341933-1', function(){
$('#report-stat').className = 'success';
}, function(){
$('#report-stat').className = 'fail';
});
}
function jsonify_fix(s){try{return JSON.parse(s);}catch(e){return {};}}
</script>
</body>
</html>