mirror of
https://github.com/lancedikson/bowser
synced 2026-03-02 03:40:27 +00:00
rebuild and new relase for IE, Opera, & Phantom
cut v0.3
This commit is contained in:
@@ -41,33 +41,33 @@
|
||||
if (ie) return {
|
||||
msie: t
|
||||
, version: ua.match(/(msie |rv:)(\d+(\.\d+)?)/i)[2]
|
||||
}
|
||||
}
|
||||
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
|
||||
, version: ua.match(/chrome\/(\d+(\.\d+)?)/i)[1]
|
||||
}
|
||||
}
|
||||
if (phantom) return {
|
||||
webkit: t
|
||||
, phantom: t
|
||||
, version: ua.match(/phantomjs\/(\d+(\.\d+)+)/i)[1]
|
||||
}
|
||||
}
|
||||
if (touchpad) return {
|
||||
webkit: t
|
||||
, touchpad: t
|
||||
, version : ua.match(/touchpad\/(\d+(\.\d+)?)/i)[1]
|
||||
}
|
||||
}
|
||||
if (iphone || ipad) {
|
||||
o = {
|
||||
webkit: t
|
||||
, mobile: t
|
||||
, ios: t
|
||||
, iphone: iphone
|
||||
, ipad: ipad
|
||||
webkit: t
|
||||
, mobile: t
|
||||
, ios: t
|
||||
, iphone: iphone
|
||||
, ipad: ipad
|
||||
}
|
||||
// WTF: version is not part of user agent in web apps
|
||||
if (webkitVersion.test(ua)) {
|
||||
@@ -80,17 +80,17 @@
|
||||
, android: t
|
||||
, mobile: t
|
||||
, version: (ua.match(webkitVersion) || ua.match(firefoxVersion))[1]
|
||||
}
|
||||
}
|
||||
if (safari) return {
|
||||
webkit: t
|
||||
, safari: t
|
||||
, version: ua.match(webkitVersion)[1]
|
||||
}
|
||||
}
|
||||
if (gecko) {
|
||||
o = {
|
||||
gecko: t
|
||||
, mozilla: t
|
||||
, version: ua.match(firefoxVersion)[1]
|
||||
gecko: t
|
||||
, mozilla: t
|
||||
, version: ua.match(firefoxVersion)[1]
|
||||
}
|
||||
if (firefox) o.firefox = t
|
||||
return o
|
||||
@@ -98,7 +98,7 @@
|
||||
if (seamonkey) return {
|
||||
seamonkey: t
|
||||
, version: ua.match(/seamonkey\/(\d+(\.\d+)?)/i)[1]
|
||||
}
|
||||
}
|
||||
return {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Bowser - a browser detector
|
||||
* https://github.com/ded/bowser
|
||||
* MIT License | (c) Dustin Diaz 2011
|
||||
*/
|
||||
* MIT License | (c) Dustin Diaz 2013
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user