The solution is attractive but not bulletproof. Changing the UserAgent in Safari is enough to trick the script into thinking I'm on Windows.
platform and vendor offer more details than just appVersion alone.
And checking appVersion to contain "Mac" doesn't identify iPhone, iPad, or other Apple devices because "Mac" is always included in the appVersion on every Apple product.


But it's a good start to improve upon :-)
YAKSH BARIYA
I create amazing things using the knowledge I have gained so far
This does not work properly on Android devices. It showed me Linux instead of Android