This code snippet detects the user's operating system (OS) and performs a specific action based on their OS. It starts by displaying an element on ...
For further actions, you may consider blocking this person and/or reporting abuse
A very legit use-case for this are keyboard shortcuts. E.g. on Macs, iPhone and iPad bind "meta + s", but "control + s" everywhere else. Also for displaying that shortcut: "⌘ + S" vs. "Ctrl + S". I couldn't find an alternative for that. Even the experimental
navigator.keyboard.getLayoutMap()doesn't seem to give the information needed for that.cool
thx! :)
Thank you, i will use your script to detect platform and show games based on user browser. Thank you lot. You safe me half hour of my life.
This isn't working for me... it says "unknow" for me (using MacOs)
It is becasue "macOS" is not included in macosPlatforms. Check this answer, it detects mac well.
stackoverflow.com/questions/382414...
Not working on m'y Android redme 9
Yes, it really is. I've made changes to the code. I'm sorry for this misunderstanding.