mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
fix: windows style
This commit is contained in:
13
src/utils/get-system.ts
Normal file
13
src/utils/get-system.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// get the system os
|
||||
// according to UA
|
||||
export default function getSystem() {
|
||||
const ua = navigator.userAgent;
|
||||
|
||||
if (ua.includes("Mac OS X")) return "macos";
|
||||
|
||||
if (/win64|win32/i.test(ua)) return "windows";
|
||||
|
||||
if (/linux/i.test(ua)) return "linux";
|
||||
|
||||
return "unknown";
|
||||
}
|
||||
Reference in New Issue
Block a user