Skip to content

Commit

Permalink
Updated detect.js to include IE Support
Browse files Browse the repository at this point in the history
  • Loading branch information
charsleysa authored and madrobby committed Sep 15, 2013
1 parent 2ea81d9 commit cc6de48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
firefox = ua.match(/Firefox\/([\d.]+)/),
ie = ua.match(/MSIE ([\d.]+)/),
safari = webkit && ua.match(/Mobile\//) && !chrome,
webview = ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/) && !chrome
webview = ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/) && !chrome,
ie = ua.match(/MSIE ([\d.]+)/)

// Todo: clean this up with a better OS/browser seperation:
// - discern (more) between multiple browsers on android
Expand Down Expand Up @@ -50,6 +51,7 @@
if (ie) browser.ie = true, browser.version = ie[1]
if (safari && (ua.match(/Safari/) || !!os.ios)) browser.safari = true
if (webview) browser.webview = true
if (ie) browser.ie = true, browser.verson = ie[1]

os.tablet = !!(ipad || playbook || (android && !ua.match(/Mobile/)) || (firefox && ua.match(/Tablet/)))
os.phone = !!(!os.tablet && !os.ipod && (android || iphone || webos || blackberry || bb10 ||
Expand Down

0 comments on commit cc6de48

Please sign in to comment.