-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathindex.html
More file actions
325 lines (301 loc) · 12.2 KB
/
Copy pathindex.html
File metadata and controls
325 lines (301 loc) · 12.2 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.webmanifest" />
<meta name="theme-color" content="#0f172a" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>JDArmy BREAK - Business Risk Enumeration & Avoidance Knowledge</title>
<meta name="description" content="BREAK是一个开放知识框架,系统化梳理业务风险、规避手段、攻击工具、威胁行为者及行业术语,帮助企业识别和应对安全威胁。" />
<meta name="keywords" content="业务风险,风控,安全,攻击工具,威胁情报,黑灰产,反欺诈,网络安全" />
<meta name="author" content="JD.Army" />
<meta property="og:title" content="JDArmy BREAK - 业务风险枚举与规避知识框架" />
<meta property="og:description" content="系统化梳理业务风险、规避手段、攻击工具和威胁行为者的开放知识框架" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://break.jd.army/" />
<meta property="og:image" content="https://break.jd.army/logo.png" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="JDArmy BREAK" />
<meta name="twitter:description" content="业务风险枚举与规避知识框架" />
</head>
<body>
<div id="app">
<style>
html,
body {
margin: 0;
min-height: 100%;
background: #0f172a;
}
#app {
min-height: 100vh;
background: #0f172a;
}
.break-boot {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
box-sizing: border-box;
background: #0f172a;
color: #dbeafe;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.break-boot__panel {
width: min(420px, 100%);
border: 1px solid rgba(148, 163, 184, 0.32);
border-radius: 8px;
padding: 24px;
background: rgba(15, 23, 42, 0.92);
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.break-boot__brand {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 18px;
}
.break-boot__mark {
width: 36px;
height: 36px;
border-radius: 8px;
background: #1e293b;
display: grid;
place-items: center;
color: #38bdf8;
font-weight: 800;
font-size: 20px;
}
.break-boot__title {
margin: 0;
color: #f8fafc;
font-size: 18px;
line-height: 1.2;
letter-spacing: 0;
}
.break-boot__subtitle {
margin: 4px 0 0;
color: #94a3b8;
font-size: 12px;
line-height: 1.4;
}
.break-boot__stage {
min-height: 22px;
margin: 0 0 12px;
color: #bfdbfe;
font-size: 14px;
line-height: 1.5;
}
.break-boot__bar {
height: 8px;
border-radius: 999px;
overflow: hidden;
background: #1e293b;
border: 1px solid rgba(148, 163, 184, 0.22);
}
.break-boot__progress {
height: 100%;
width: 12%;
border-radius: inherit;
background: #38bdf8;
transition: width 240ms ease;
}
.break-boot__hint {
min-height: 20px;
margin: 12px 0 0;
color: #94a3b8;
font-size: 12px;
line-height: 1.5;
}
.break-boot__actions {
display: none;
gap: 8px;
margin-top: 16px;
flex-wrap: wrap;
}
.break-boot__button {
appearance: none;
border: 1px solid rgba(56, 189, 248, 0.48);
border-radius: 6px;
background: #0f172a;
color: #e0f2fe;
cursor: pointer;
font-size: 13px;
line-height: 1;
padding: 9px 12px;
}
.break-boot__button:hover {
background: #172554;
}
.break-boot.is-error .break-boot__progress {
background: #fb7185;
}
.break-boot.is-error .break-boot__actions {
display: flex;
}
</style>
<section class="break-boot" id="break-boot" aria-live="polite" aria-busy="true">
<div class="break-boot__panel">
<div class="break-boot__brand">
<div class="break-boot__mark" aria-hidden="true">B</div>
<div>
<h1 class="break-boot__title">JDARMY BREAK</h1>
<p class="break-boot__subtitle">Business Risk Enumeration & Avoidance Knowledge</p>
</div>
</div>
<p class="break-boot__stage" id="break-boot-stage">正在加载应用资源...</p>
<div class="break-boot__bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="12" aria-label="应用加载进度">
<div class="break-boot__progress" id="break-boot-progress"></div>
</div>
<p class="break-boot__hint" id="break-boot-hint">首次访问或网络较慢时可能需要稍等。</p>
<div class="break-boot__actions" id="break-boot-actions">
<button class="break-boot__button" type="button" data-break-boot-reload id="break-boot-reload">刷新页面</button>
<button class="break-boot__button" type="button" data-break-boot-clear id="break-boot-clear">清理缓存并刷新</button>
</div>
</div>
</section>
</div>
<script>
(function () {
var root = document.getElementById("break-boot");
var stage = document.getElementById("break-boot-stage");
var hint = document.getElementById("break-boot-hint");
var progress = document.getElementById("break-boot-progress");
var bar = document.querySelector(".break-boot__bar");
var reloadButton = document.getElementById("break-boot-reload");
var clearButton = document.getElementById("break-boot-clear");
var bootMessages = {
cn: {
initialStage: "正在加载应用资源...",
progressLabel: "应用加载进度",
initialHint: "首次访问或网络较慢时可能需要稍等。",
slowHint: "网络较慢,正在继续加载核心资源。",
timeoutError: "加载时间较长,可能是网络异常或页面资源正在更新。",
genericError: "页面资源加载失败。",
retryHint: "可以刷新页面;如果问题持续,请清理缓存后重试。",
reload: "刷新页面",
clear: "清理缓存并刷新"
},
en: {
initialStage: "Loading application resources...",
progressLabel: "Application loading progress",
initialHint: "First visits or slow networks may take a moment.",
slowHint: "The network is slow. Still loading core resources.",
timeoutError: "Loading is taking longer than expected. The network may be unstable or page resources may be updating.",
genericError: "Page resources failed to load.",
retryHint: "Refresh the page. If the issue continues, clear the cache and try again.",
reload: "Refresh page",
clear: "Clear cache and refresh"
}
};
var savedLocale = null;
try {
savedLocale = window.localStorage ? window.localStorage.getItem("break-locale") : null;
} catch (error) {
savedLocale = null;
}
var browserLanguage = window.navigator && window.navigator.language ? window.navigator.language : "";
var bootLocale = savedLocale === "en" || (!savedLocale && browserLanguage.indexOf("en") === 0) ? "en" : "cn";
var bootText = bootMessages[bootLocale];
if (stage) stage.textContent = bootText.initialStage;
if (bar) bar.setAttribute("aria-label", bootText.progressLabel);
if (hint) hint.textContent = bootText.initialHint;
if (reloadButton) reloadButton.textContent = bootText.reload;
if (clearButton) clearButton.textContent = bootText.clear;
var currentPercent = 12;
var progressTimer = window.setInterval(function () {
if (!root || root.dataset.done === "true") return;
if (currentPercent >= 82) return;
var step = currentPercent < 45 ? 5 : currentPercent < 68 ? 3 : 1;
updateProgress(Math.min(82, currentPercent + step));
}, 700);
var slowTimer = window.setTimeout(function () {
if (!root || root.dataset.done === "true") return;
hint.textContent = bootText.slowHint;
}, 6000);
var errorTimer = window.setTimeout(function () {
if (!root || root.dataset.done === "true") return;
setError(bootText.timeoutError);
}, 15000);
function updateProgress(percent) {
currentPercent = Math.max(currentPercent, Math.max(0, Math.min(100, percent)));
if (progress) progress.style.width = currentPercent + "%";
if (bar) bar.setAttribute("aria-valuenow", String(currentPercent));
}
function setStage(text, percent, nextHint) {
if (!root || root.dataset.done === "true") return;
root.classList.remove("is-error");
if (stage && text) stage.textContent = text;
if (typeof percent === "number") {
updateProgress(percent);
}
if (hint && nextHint) hint.textContent = nextHint;
}
function setError(text) {
if (!root || root.dataset.done === "true") return;
root.classList.add("is-error");
root.setAttribute("aria-busy", "false");
if (stage) stage.textContent = text || bootText.genericError;
if (hint) hint.textContent = bootText.retryHint;
}
function done() {
if (progressTimer) window.clearInterval(progressTimer);
if (slowTimer) window.clearTimeout(slowTimer);
if (errorTimer) window.clearTimeout(errorTimer);
if (root) root.dataset.done = "true";
}
window.__BREAK_BOOT__ = { setStage: setStage, setError: setError, done: done };
document.addEventListener("click", function (event) {
var target = event.target;
if (!(target instanceof HTMLElement)) return;
if (target.matches("[data-break-boot-reload]")) {
window.location.reload();
}
if (target.matches("[data-break-boot-clear]")) {
Promise.resolve()
.then(function () {
if (!("caches" in window)) return;
return caches.keys().then(function (keys) {
return Promise.all(keys.map(function (key) { return caches.delete(key); }));
});
})
.then(function () {
if ("serviceWorker" in navigator) {
return navigator.serviceWorker.getRegistrations().then(function (registrations) {
return Promise.all(registrations.map(function (registration) { return registration.unregister(); }));
});
}
})
.finally(function () {
window.location.reload();
});
}
});
window.addEventListener("error", function (event) {
if (event.filename || event.message) {
setError("页面资源加载失败。");
}
});
window.addEventListener("unhandledrejection", function () {
setError("页面资源加载失败。");
});
})();
</script>
<script type="module" src="/src/main.ts"></script>
<!-- 百度统计暂时禁用 -->
<!--
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?cc6ade5f20590cf922084b91b3dfaac2";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
-->
</body>
</html>