I'm running an online experiment where I need participants to use only laptop/desktop but not mobile devices.
Thanks to otree developers, there's a
code snippet that helps detect mobile browsers. However, I noticed that in that code snippet, the way to detect iPad is to find string "iPad" in the user-agent, yet after iOS 13, iPad's user-agent includes 'Macintosh' instead of 'iPad', which is the same as Mac. In other words, we can no longer tell iPad from Mac
based on user-agent alone.
I was wondering how you guys detect iPad using JavaScript. Any help is appreciated :)