UI: Implement JavaScript getOS function Windows platform architecture detection #104136
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
async function getOS() {
|
async function getOS() {
|
||||||
// Init variable OS default
|
// Init variable OS default
|
||||||
var OS = "windows";
|
let OS = "windows";
|
||||||
|
|
||||||
function getOSPlaformVersion() {
|
function getOSPlaformVersion() {
|
||||||
//MacOS, MacOS X, macOS
|
//MacOS, MacOS X, macOS
|
||||||
@ -72,7 +72,7 @@ async function getOS() {
|
|||||||
* https://learn.microsoft.com/en-us/microsoft-edge/web-platform/how-to-detect-win11#sample-code-for-detecting-arm-or-x86
|
* https://learn.microsoft.com/en-us/microsoft-edge/web-platform/how-to-detect-win11#sample-code-for-detecting-arm-or-x86
|
||||||
*/
|
*/
|
||||||
// Wait for and get the high entropy values from async method
|
// Wait for and get the high entropy values from async method
|
||||||
var ua = await navigator.userAgentData.getHighEntropyValues(["architecture", "bitness"]);
|
let ua = await navigator.userAgentData.getHighEntropyValues(["architecture", "bitness"]);
|
||||||
|
|
||||||
// Check if the platform is Windows
|
// Check if the platform is Windows
|
||||||
if (navigator.userAgentData.platform === "Windows") {
|
if (navigator.userAgentData.platform === "Windows") {
|
||||||
|
Loading…
Reference in New Issue
Block a user