Skip to content

Instantly share code, notes, and snippets.

@marjanbonus
Last active August 29, 2015 14:13
Show Gist options
  • Save marjanbonus/26c6ed423c7455392b08 to your computer and use it in GitHub Desktop.
Save marjanbonus/26c6ed423c7455392b08 to your computer and use it in GitHub Desktop.
Target Safari only
if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
console.log("Safari!");
}
if (!!navigator.userAgent.match(/Trident\/7\./)) {
console.log("IE!!!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment