Skip to content

Commit

Permalink
Add chrome detection in browser.js
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Apr 13, 2017
1 parent 46190a9 commit 931e286
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if (typeof navigator != "undefined") {
let ie = result.ie = !!(ie_upto10 || ie_11up || ie_edge)
result.ie_version = ie_upto10 ? document.documentMode || 6 : ie_11up ? +ie_11up[1] : ie_edge ? +ie_edge[1] : null
result.gecko = !ie && /gecko\/\d/i.test(navigator.userAgent)
result.chrome = !ie && /Chrome\//.test(navigator.userAgent)
result.ios = !ie && /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent)
result.webkit = !ie && 'WebkitAppearance' in document.documentElement.style
}

0 comments on commit 931e286

Please sign in to comment.