Closed ArgoZhang closed 2 years ago
navigator.userAgentData.getHighEntropyValues(["platformVersion"]) .then(ua => { if (navigator.userAgentData.platform === "Windows") { const majorPlatformVersion = parseInt(ua.platformVersion.split('.')[0]); if (majorPlatformVersion >= 13) { console.log("Windows 11 or later"); } else if (majorPlatformVersion > 0) { console.log("Windows 10"); } else { console.log("Before Windows 10"); } } else { console.log("Not running on Windows"); } });
等有时间,我想提交一个 PR 给仓库不知道是否可以
已增加
等有时间,我想提交一个 PR 给仓库不知道是否可以