Skip to content

Instantly share code, notes, and snippets.

@vincenavarro
Last active August 28, 2019 19:31
Show Gist options
  • Save vincenavarro/8704fe7257b9f9fb99ea854165304d0b to your computer and use it in GitHub Desktop.
Save vincenavarro/8704fe7257b9f9fb99ea854165304d0b to your computer and use it in GitHub Desktop.
One Line Mobile Detection (Depreciated)
const isMobileDevice = () => (typeof window.orientation !== "undefined") || (navigator.userAgent.indexOf('IEMobile') !== -1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment