惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
N
Netflix TechBlog - Medium
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
D
Docker
WordPress大学
WordPress大学
罗磊的独立博客
J
Java Code Geeks
博客园 - 【当耐特】
博客园 - 司徒正美
雷峰网
雷峰网
H
Help Net Security
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
T
Tailwind CSS Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
B
Blog

朽丘秋雨

关于备案、主题开发和短暂停更的一点说明 | 柯讴朽丘的生活日志 如何启用域名DNSSEC的设置以及吃瓜某蒂云服务商跑路这件事 快速登记自己的作品版权合法保护自己的绘画等艺术作品 实现Artalk中间页安全跳转和表情包小图BUG预览 最近的改动和生活 小柯庆生这件事 一则域名通知申明 春节游记 简易的链接反馈 舟终末地初玩体验 再见2025,你好2026 小站最新装修 25年11月灌水闲说 放下热爱,归向烟火,致大家的一封告别与交代信 比起顺意哄劝,我选笨拙地托你往亮处走 25年7月小结 代际观念与亲情现实的双重困局 25年6月小结 封建派还是自由派,真的是我封建吗 心悦君兮君不知,一寸相思一寸灰 25年4月小结 四月自我笔记 25年3月小结 25年2月小结 25年1月小结 漂泊异乡终归巢 社会变迁与个人成长:一种代际观察 好耶,热乎着,新形象! 再见2024,你好2025 24年12月小结
给Hexo和留言添加跳转中间页
klcdm · 2026-01-09 · via 朽丘秋雨
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<link rel="icon" href="/xiaoke.png" type="image/x-icon">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow"/>
<title>😃页面加载中,请稍候...</title>
<style type="text/css">
body {
overflow: hidden;
height: 100vh;
width: 100vw;
margin: 0;
padding: 0;
transition: background 0.3s ease-in-out;
}
.container {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
margin: 0;
flex-direction: column;
}
.avatar-placeholder, .avatar {
width: 100px;
height: 100px;
border-radius: 50%;
margin-bottom: 15px;
display: block;
}
.avatar {
display: none;
}
.description {
font-size: 20px;
font-weight: 600;
}
.subtitle {
font-size: 15px;
margin-bottom: 20px;
color: #C4C4C4;
}
.loading {
text-align: center;
padding: 30px;
border-radius: 25px;
animation: fadein 2s;
width: 450px;
max-width: 80%;
transition: all 0.3s ease-in-out;
}
@keyframes fadein {
from { opacity: 0 }
to { opacity: 1 }
}
.content {
margin-bottom: 20px;
}
.url-text {
margin-bottom: 10px;
font-size: 16px;
letter-spacing: 1px;
}
.jump-url {
position: relative;
font-size: 20px;
display: block;
margin-top: 5px;
margin-bottom: 25px;
padding: 15px;
border-radius: 18px;
height: 25px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.copy-btn-container {
position: absolute;
display: flex;
align-items: center;
right: 10px;
top: 50%;
transform: translateY(-50%);
height: 100%;
width: 63px;
flex-direction: row-reverse;
}
.copy-btn {
width: 40px;
height: 40px;
border-radius: 12px;
border: 1px solid #a4a4a4;
transition: all 0.3s ease-in-out;
cursor: pointer;
}
.copy-btn-container svg {
width: 25px;
height: 25px;
fill: #888;
}
.countdown-text {
margin-top: 12px;
font-size: 12px;
}
.button-container {
display: flex;
justify-content: center;
gap: 20%;
margin-top: 20px;
}
.button {
padding: 10px 20px;
border-radius: 16px;
border: none;
cursor: pointer;
font-size: 16px;
width: 120px;
height: 40px;
}
.cancel-button {
color: black;
}
.confirm-button {
color: white;
}
/* 白天模式 */
body.light {
background: linear-gradient(135deg, #E9E9E9, #FFFFFF);
}
body.light .loading {
border: 1px solid #ccc;
background: rgba(255,255,255,0.7);
box-shadow: 0 16px 32px rgba(0,0,0,0.1);
}
body.light .loading:hover {
box-shadow: 0 16px 32px rgba(0,0,0,0.2);
}
body.light .url-text {
color: #333;
}
body.light .jump-url {
border: 1px solid #ccc;
background-color: #F7F9FE;
color: #333;
}
body.light .copy-btn-container {
background: linear-gradient(to left, #F7F9FE 75%,transparent 100%);
}
body.light .copy-btn {
background-color: #F7F9FE;
}
body.light .copy-btn:hover {
box-shadow: 0 16px 32px rgba(100,100,100,0.2);
}
body.light .countdown-text {
color: #515151;
}
body.light .cancel-button {
background-color: #a6e3e9;
}
body.light .confirm-button {
background-color: #3fc1c9;
}
/* 黑夜模式 */
body.dark {
background: linear-gradient(135deg, #364f6b, #222831);
}
body.dark .loading {
border: 1px solid #777;
background: #393e46;
color: #EFEFEF;
box-shadow: 0 16px 32px rgba(100,100,100,0.1);
}
body.dark .loading:hover {
box-shadow: 0 16px 32px rgba(100,100,100,0.2);
}
body.dark .description {
color: #F3F3F3;
}
body.dark .url-text, body.dark .countdown-text {
color: #EFEFEF;
}
body.dark .jump-url {
border: 1px solid #777;
background-color: #333;
color: #EFEFEF;
}
body.dark .copy-btn-container {
background: linear-gradient(to left, #333 75%,transparent 100%);
}
body.dark .copy-btn {
background-color: #222831;
}
body.dark .copy-btn:hover {
box-shadow: 0 16px 32px rgba(100,100,100,0.2);
}
body.dark .cancel-button {
background-color: #872C2C;
color: #FFF;
}
body.dark .confirm-button {
background-color: #28566F;
color: #FFF;
}
</style>
<script type="text/javascript">
// 适配Stellar主题的日夜模式
function detectStellarTheme() {
const body = document.body;
const theme = localStorage.getItem('theme');
if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
body.classList.add('dark');
body.classList.remove('light');
} else {
body.classList.add('light');
body.classList.remove('dark');
}
}

// 获取URL参数
function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
return r ? decodeURIComponent(r[2]) : null; // 改用decodeURIComponent,兼容URL编码的参数
}

// 安全解码URL参数(优化容错性)
function decodeSafeUrlParam(paramStr) {
try {
// 修复base64替换逻辑,添加补全等号的处理
const base64 = paramStr.replace(/-/g, '+').replace(/_/g, '/');
// 补全base64缺失的等号
const paddedBase64 = base64.padEnd(base64.length + (4 - base64.length % 4) % 4, '=');
const decodedBinary = atob(paddedBase64);
const decoded = decodeURIComponent(Array.from(decodedBinary).map(c =>
'%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)
).join(''));
return decoded;
} catch (e) {
console.warn('URL解码失败,使用原始值:', e);
return paramStr;
}
}

// 跳转逻辑
let jump_url = GetQueryString('url');
// 解码处理
if (jump_url) {
jump_url = decodeSafeUrlParam(jump_url);
}

// 修复核心:正确创建正则表达式对象,添加i忽略大小写
const UrlReg = new RegExp('^((http|https|thunder|qqdl|ed2k|Flashget|qbrowser|ftp|rtsp|mms)://)', 'i');
// 验证URL合法性
if (!jump_url || !UrlReg.test(jump_url)) { // 改用test方法更高效
document.title = '参数错误,正在返回首页...';
jump_url = location.origin;
}

// 手动跳转函数(仅修改此处,从新建窗口改为当前窗口)
function jump() {
location.href = jump_url; // 当前窗口直接跳转
}

// 关闭/返回逻辑
function closeWindow() {
function isWeChat() {
return /MicroMessenger/i.test(navigator.userAgent);
}
function isQQ() {
return /QQ/i.test(navigator.userAgent) && !/MicroMessenger/i.test(navigator.userAgent);
}

if (isWeChat()) {
if (typeof WeixinJSBridge !== "undefined") {
WeixinJSBridge.call('closeWindow');
} else {
document.addEventListener('WeixinJSBridgeReady', function () {
WeixinJSBridge.call('closeWindow');
}, { once: true });
setTimeout(() => fallbackBack(), 500);
}
} else if (isQQ()) {
try {
if (typeof mqq !== "undefined" && mqq.ui && mqq.ui.closeWebView) {
mqq.ui.closeWebView();
} else {
fallbackBack();
}
} catch (e) {
fallbackBack();
}
} else {
fallbackBack();
}
}

// 返回兜底函数
function fallbackBack() {
if (window.history.length <= 1) {
window.location.href = location.origin;
} else {
window.history.back();
}
}

// 复制链接功能
function copyToClipboard() {
const urlText = document.getElementById('jump-url-text').textContent;
// 改用Clipboard API,替代过时的execCommand
navigator.clipboard.writeText(urlText).then(() => {
alert('链接已复制到剪贴板!');
}).catch(() => {
// 降级方案
const tempInput = document.createElement('input');
tempInput.value = urlText;
document.body.appendChild(tempInput);
tempInput.select();
document.execCommand('copy');
document.body.removeChild(tempInput);
alert('链接已复制到剪贴板!');
});
}

// 加载头像
async function loadAvatar() {
const avatarImg = document.querySelector('.avatar');
const placeholder = document.querySelector('.avatar-placeholder');
const img = new Image();
img.src = '/xiaoke.png';
img.onload = function () {
avatarImg.src = img.src;
avatarImg.style.display = 'block';
placeholder.style.display = 'none';
}
img.onerror = function() {
placeholder.style.display = 'none'; // 加载失败隐藏占位符
}
}

// 页面初始化
window.addEventListener('load', function () {
detectStellarTheme();
loadAvatar();
// 显示目标链接
const jumpUrlElement = document.getElementById('jump-url-text');
jumpUrlElement.textContent = jump_url;
// 更新提示文本
const countdownText = document.querySelector('.countdown-text');
countdownText.textContent = "💡请自行确认链接安全性,手动点击跳转";
// 监听主题切换
window.addEventListener('storage', (e) => {
if (e.key === 'theme') detectStellarTheme();
});
});
</script>
</head>
<body>
<div class="container">
<div class="avatar-placeholder"></div>
<img src="" alt="头像" class="avatar">
<div class="description">朽丘秋雨</div>
<div class="subtitle">安全提示</div>
<div class="loading">
<div class="content">
<div class="url-text">您即将离开本站,跳转到:</div>
<div class="jump-url" id="jump-url">
<span id="jump-url-text"></span>
<div class="copy-btn-container">
<button class="copy-btn" onclick="copyToClipboard()">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<path d="M208 0L332.1 0c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9L448 336c0 26.5-21.5 48-48 48l-192 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48zM48 128l80 0 0 64-64 0 0 256 192 0 0-32 64 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 176c0-26.5 21.5-48 48-48z"/>
</svg>
</button>
</div>
</div>
</div>
<div class="countdown-text">⚡请自行确认链接安全性,手动点击跳转</div>
<div class="button-container">
<button class="button cancel-button" onclick="closeWindow()">取消跳转</button>
<button class="button confirm-button" onclick="jump()">立即跳转</button>
</div>
</div>
</div>
</body>
</html>