-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheasterEgg.html
More file actions
196 lines (187 loc) · 6.92 KB
/
Copy patheasterEgg.html
File metadata and controls
196 lines (187 loc) · 6.92 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>彩蛋 - 神庙逃亡</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
overflow: hidden;
background: #0a0a0f;
color: #e8d5b0;
font-family: 'Georgia', serif;
}
.container {
position: fixed;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: radial-gradient(ellipse at center, #1a1015 0%, #0a0a0f 70%);
}
h1 {
font-size: 48px;
color: #d4a0ff;
text-shadow: 0 0 30px rgba(180, 80, 255, 0.3);
font-family: 'STKaiti', 'KaiTi', '楷体', serif;
letter-spacing: 0.15em;
margin-bottom: 10px;
}
.subtitle {
font-size: 14px;
color: rgba(200, 150, 255, 0.4);
letter-spacing: 0.3em;
margin-bottom: 30px;
}
.egg-content {
text-align: center;
margin-bottom: 30px;
}
.egg-icon {
font-size: 80px;
margin-bottom: 20px;
animation: egg-float 3s ease-in-out infinite;
}
@keyframes egg-float {
0%, 100% { transform: translateY(0) scale(1); }
50% { transform: translateY(-10px) scale(1.05); }
}
.egg-text {
color: rgba(200, 150, 255, 0.6);
font-size: 15px;
letter-spacing: 0.15em;
line-height: 2;
}
.redirect-info {
color: rgba(200, 150, 255, 0.25);
font-size: 12px;
margin-top: 20px;
letter-spacing: 0.1em;
}
.loading-dots::after {
content: '';
animation: dots 1.5s steps(4, end) infinite;
}
@keyframes dots {
0% { content: ''; }
25% { content: '.'; }
50% { content: '..'; }
75% { content: '...'; }
100% { content: ''; }
}
.back-btn {
display: inline-block;
padding: 10px 30px;
margin-top: 24px;
border: 1px solid rgba(180, 80, 255, 0.3);
background: linear-gradient(135deg, rgba(30,15,40,0.7), rgba(60,30,80,0.5));
color: #e0c0ff;
text-decoration: none;
font-size: 14px;
font-family: 'STKaiti', 'KaiTi', '楷体', serif;
letter-spacing: 0.3em;
transition: all 0.35s ease;
border-radius: 4px;
display: none;
}
.back-btn:hover {
border-color: rgba(180, 80, 255, 0.6);
box-shadow: 0 0 25px rgba(180, 80, 255, 0.15);
transform: scale(1.04);
color: #f0d0ff;
}
</style>
</head>
<body>
<div class="container">
<div class="egg-content">
<div class="egg-icon">♫</div>
<h1>彩 蛋</h1>
<div class="subtitle">◆ Surprise! ◆</div>
<div class="egg-text">
你即将被 Rick Roll ...<br>
正在检测你的位置 <span class="loading-dots"></span>
</div>
<div class="redirect-info" id="redirect-info">
正在跳转...
</div>
<a href="index.html" class="back-btn" id="back-btn">← 返回主菜单</a>
</div>
</div>
<script>
// ================================================================
// IP-based Rick Roll Redirect
// ================================================================
const BILIBILI_URL = 'https://www.bilibili.com/video/BV19sE461EcC/';
const YOUTUBE_URL = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
const infoEl = document.getElementById('redirect-info');
const backBtn = document.getElementById('back-btn');
async function detectAndRedirect() {
// Attempt 1: ip-api.com (fast, widely available)
try {
const res = await fetch('https://ip-api.com/json/?fields=countryCode', {
signal: AbortSignal.timeout(3000)
});
const data = await res.json();
if (data.countryCode === 'CN') {
infoEl.textContent = '检测到国内 IP,为你跳转至 B 站...';
setTimeout(() => { window.location.href = BILIBILI_URL; }, 1500);
} else {
infoEl.textContent = '检测到海外 IP,为你跳转至 YouTube...';
setTimeout(() => { window.location.href = YOUTUBE_URL; }, 1500);
}
return;
} catch(e) {
console.log('ip-api.com failed:', e);
}
// Attempt 2: ip.useragentinfo.com (Chinese service)
try {
const res = await fetch('https://ip.useragentinfo.com/json', {
signal: AbortSignal.timeout(3000)
});
const data = await res.json();
if (data.country === '中国') {
infoEl.textContent = '检测到国内 IP,为你跳转至 B 站...';
setTimeout(() => { window.location.href = BILIBILI_URL; }, 1500);
} else {
infoEl.textContent = '检测到海外 IP,为你跳转至 YouTube...';
setTimeout(() => { window.location.href = YOUTUBE_URL; }, 1500);
}
return;
} catch(e) {
console.log('ip.useragentinfo.com failed:', e);
}
// Attempt 3: myip.ipip.net (simple text)
try {
const res = await fetch('https://myip.ipip.net', {
signal: AbortSignal.timeout(3000)
});
const text = await res.text();
if (text.includes('中国')) {
infoEl.textContent = '检测到国内 IP,为你跳转至 B 站...';
setTimeout(() => { window.location.href = BILIBILI_URL; }, 1500);
} else {
infoEl.textContent = '检测到海外 IP,为你跳转至 YouTube...';
setTimeout(() => { window.location.href = YOUTUBE_URL; }, 1500);
}
return;
} catch(e) {
console.log('myip.ipip.net failed:', e);
}
// Fallback: could not detect, go to YouTube (international default)
infoEl.textContent = '无法检测位置,默认跳转至 YouTube...';
setTimeout(() => { window.location.href = YOUTUBE_URL; }, 1500);
}
// If redirect fails (user is still here after 5 seconds), show back button
setTimeout(() => {
if (!document.hidden) {
backBtn.style.display = 'inline-block';
infoEl.textContent = '跳转未自动完成?点击下方按钮手动返回';
}
}, 5000);
detectAndRedirect();
</script>
</body>
</html>