Files
controller-v2/client/i.html
T
2026-06-02 19:55:09 +08:00

45 lines
1.6 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
<title>Luxsin X8 Controller</title>
<style>
body { margin:0; display:flex; align-items:center; justify-content:center; min-height:100vh; background:#000; color:rgba(255,255,255,.5); font-family:-apple-system,sans-serif; }
.spinner { width:24px; height:24px; border:3px solid rgba(255,255,255,.15); border-top-color:#00FFF6; border-radius:50%; animation:spin .8s linear infinite; margin-right:12px; }
@keyframes spin { to { transform:rotate(360deg); } }
</style>
</head>
<body>
<div class="spinner"></div>
<span>Loading…</span>
<script>
(function () {
var ua = navigator.userAgent;
// Match Chrome/<version> in the UA string
var chromeMatch = ua.match(/Chrome\/(\d+)/);
var isAndroid = /Android/.test(ua);
var chromeVersion = chromeMatch ? parseInt(chromeMatch[1], 10) : 999;
// Determine the base path: i.html lives at <base>/i.html
// so strip the filename to get <base>.
var currentPath = location.pathname;
var basePath = currentPath.substring(0, currentPath.lastIndexOf("/") + 1);
// Choose target based on browser capability
var target;
if (isAndroid && chromeVersion < 100) {
target = basePath + "legacy/i.legacy.html";
} else {
target = basePath + "modern/i.modern.html";
}
// Preserve query string and hash
var qs = location.search || "";
var hash = location.hash || "";
location.replace(target + qs + hash);
})();
</script>
</body>
</html>