fix: 修复 macOS 架构显示回退为完整UA的问题

This commit is contained in:
JSR
2026-03-27 21:04:23 +08:00
parent 18d27f65b1
commit a1d93e1d76
+7 -2
View File
@@ -518,13 +518,18 @@ function getArchitecture(): string {
if (userAgent.includes("arm64") || userAgent.includes("aarch64")) { if (userAgent.includes("arm64") || userAgent.includes("aarch64")) {
return "ARM64" return "ARM64"
} else if (userAgent.includes("x64") || userAgent.includes("amd64")) { } else if (
userAgent.includes("x64") ||
userAgent.includes("amd64") ||
userAgent.includes("x86_64") ||
userAgent.includes("intel")
) {
return "x64" return "x64"
} else if (userAgent.includes("i386") || userAgent.includes("i686")) { } else if (userAgent.includes("i386") || userAgent.includes("i686")) {
return "x86" return "x86"
} }
return userAgent return "Unknown"
} }
function getPlatform(): string { function getPlatform(): string {