Skip to content

Instantly share code, notes, and snippets.

@timbornholdt
Created November 1, 2017 21:22
Show Gist options
  • Save timbornholdt/b79b415ea96645bf76c2a67b8940a9b9 to your computer and use it in GitHub Desktop.
Save timbornholdt/b79b415ea96645bf76c2a67b8940a9b9 to your computer and use it in GitHub Desktop.
var operatingSystem, userAgentString = navigator.userAgent;
if (userAgentString.indexOf("iPhone") > -1 || userAgentString.indexOf("iPod") > -1 || userAgentString.indexOf("iPad") > -1) {
window.location = ""; // URL for iOS devices
} else if (/Android/.test(userAgentString)) {
window.location = ""; // URL for Android devices
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment