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 committed Apr 20, 2013
1 parent a8639da commit 4308cf4
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 @@ -18,7 +18,8 @@
rimtabletos = ua.match(/(RIM\sTablet\sOS)\s([\d.]+)/),
playbook = ua.match(/PlayBook/),
chrome = ua.match(/Chrome\/([\d.]+)/) || ua.match(/CriOS\/([\d.]+)/),
firefox = ua.match(/Firefox\/([\d.]+)/)
firefox = ua.match(/Firefox\/([\d.]+)/),
ie = ua.match(/MSIE ([\d.]+)/)

// Todo: clean this up with a better OS/browser seperation:
// - discern (more) between multiple browsers on android
Expand All @@ -42,6 +43,7 @@
if (!silk && os.android && ua.match(/Kindle Fire/)) browser.silk = true
if (chrome) browser.chrome = true, browser.version = chrome[1]
if (firefox) browser.firefox = true, browser.version = firefox[1]
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 && (android || iphone || webos || blackberry || bb10 ||
Expand Down

0 comments on commit 4308cf4

Please sign in to comment.