You can use the navigator.platform
property to get the operating system platform in JavaScript. This property returns a string representing the platform of the browser in use. Here's an example:
index.tsx60 chars3 lines
This will output a string like "Win32" or "MacIntel". This property is not always reliable, as some browsers may return incorrect or misleading information. You should use it as a rough guide only.
gistlibby LogSnag