1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Merge pull request #21 from bbog/patch-1

Update bowser.js
This commit is contained in:
Dustin Diaz 2013-08-16 12:53:12 -07:00
commit f8e28168de

View File

@ -27,7 +27,7 @@
, ipad = /ipad/i.test(ua)
, touchpad = /touchpad/i.test(ua)
, android = /android/i.test(ua)
, opera = /opera/i.test(ua)
, opera = /opera/i.test(ua) || /opr/i.test(ua)
, firefox = /firefox/i.test(ua)
, gecko = /gecko\//i.test(ua)
, seamonkey = /seamonkey\//i.test(ua)
@ -41,6 +41,10 @@
msie: t
, version: ua.match(/msie (\d+(\.\d+)?);/i)[1]
}
if (opera) return {
opera: t
, version: ua.match(webkitVersion) ? ua.match(webkitVersion)[1] : ua.match(/opr\/(\d+(\.\d+)?)/i)
}
if (chrome) return {
webkit: t
, chrome: t
@ -81,10 +85,6 @@
, safari: t
, version: ua.match(webkitVersion)[1]
}
if (opera) return {
opera: t
, version: ua.match(webkitVersion)[1]
}
if (gecko) {
o = {
gecko: t