Skip to content

Instantly share code, notes, and snippets.

@braandl
Last active July 21, 2023 07:50
Show Gist options
  • Save braandl/f7965f62a5fecc379476d2c055838e36 to your computer and use it in GitHub Desktop.
Save braandl/f7965f62a5fecc379476d2c055838e36 to your computer and use it in GitHub Desktop.
Detect iPad OS (v 13) with Javascript
var isIPadOs = window.AuthenticatorAssertionResponse === undefined
&& window.AuthenticatorAttestationResponse === undefined
&& window.AuthenticatorResponse === undefined
&& window.Credential === undefined
&& window.CredentialsContainer === undefined
&& window.DeviceMotionEvent !== undefined
&& window.DeviceOrientationEvent !== undefined
&& navigator.maxTouchPoints === 5
&& navigator.plugins.length === 0
&& navigator.platform !== "iPhone";
@LoveMeWithoutAll
Copy link

it doesn't work!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment