1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

added tests for seamonkey and fixed detection

This commit is contained in:
BendingBender
2014-02-21 00:30:09 +01:00
parent 4acca40a99
commit 1a22035c5b
4 changed files with 49 additions and 17 deletions

View File

@@ -137,14 +137,19 @@
, mozilla: t
, version: ((v = ua.match(firefoxVersion)) && v? v[1] : 0)
}
if (firefox) {
o.name = 'Firefox';
o.firefox = t;
if (seamonkey) {
o.name = 'SeaMonkey'
o.seamonkey = t
o.version = ua.match(/seamonkey\/(\d+(\.\d+)?)/i)[1]
} else if (firefox) {
o.name = 'Firefox'
o.firefox = t
}
if (android) {
o.android = t
o.mobile = t
}
}
else if (android) o = {
name: 'Android'
@@ -159,11 +164,6 @@
, safari: t
, version: ((v = ua.match(webkitVersion)) ? v[1] : 0)
}
else if (seamonkey) o = {
name: 'SeaMonkey'
, seamonkey: t
, version: ua.match(/seamonkey\/(\d+(\.\d+)?)/i)[1]
}
// Graded Browser Support
// http://developer.yahoo.com/yui/articles/gbs

View File

@@ -329,6 +329,15 @@ module.exports.useragents = {
, android: true
, a: true
}
, 'Mozilla/5.0 (Android; Tablet; rv:26.0) Gecko/26.0 Firefox/26.0': {
mozilla: true
, gecko: true
, firefox: true
, version: '26.0'
, mobile: true
, android: true
, a: true
}
, 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0': {
mozilla: true
, gecko: true
@@ -407,6 +416,29 @@ module.exports.useragents = {
, c: true
}
}
, SeaMonkey: {
'Mozilla/5.0 (Windows NT 5.2; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 SeaMonkey/2.7.1': {
mozilla: true
, gecko: true
, seamonkey: true
, version: '2.7'
, x: true
}
, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 SeaMonkey/2.7.1': {
mozilla: true
, gecko: true
, seamonkey: true
, version: '2.7'
, x: true
}
, 'Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 SeaMonkey/2.7.1': {
mozilla: true
, gecko: true
, seamonkey: true
, version: '2.7'
, x: true
}
}
, iPhone: {
'Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5': {
ios: true