mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
Vivaldi pass tests.
This commit is contained in:
parent
3f42b985d0
commit
bef1c560d9
@ -32,6 +32,7 @@ if (bowser.msie && bowser.version <= 6) {
|
|||||||
* Bada browser as `bada`[`webkit`]
|
* Bada browser as `bada`[`webkit`]
|
||||||
* Tizen browser as `tizen`[`webkit`]
|
* Tizen browser as `tizen`[`webkit`]
|
||||||
* Sailfish browser as `sailfish`[`gecko`]
|
* Sailfish browser as `sailfish`[`gecko`]
|
||||||
|
* Vivaldi browser as `vivaldi`[`webkit`]
|
||||||
|
|
||||||
For all detected browsers the browser version is set in the `version` field.
|
For all detected browsers the browser version is set in the `version` field.
|
||||||
|
|
||||||
|
@ -65,14 +65,23 @@
|
|||||||
, msie: t
|
, msie: t
|
||||||
, version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i)
|
, version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i)
|
||||||
}
|
}
|
||||||
} else if (chromeBook) {
|
}
|
||||||
|
else if (/vivaldi/i.test(ua)) {
|
||||||
|
result = {
|
||||||
|
name: 'Vivaldi'
|
||||||
|
, vivaldi: t
|
||||||
|
, version: getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i) || versionIdentifier
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (chromeBook) {
|
||||||
result = {
|
result = {
|
||||||
name: 'Chrome'
|
name: 'Chrome'
|
||||||
, chromeBook: t
|
, chromeBook: t
|
||||||
, chrome: t
|
, chrome: t
|
||||||
, version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
|
, version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
|
||||||
}
|
}
|
||||||
} else if (/chrome.+? edge/i.test(ua)) {
|
}
|
||||||
|
else if (/chrome.+? edge/i.test(ua)) {
|
||||||
result = {
|
result = {
|
||||||
name: 'Microsoft Edge'
|
name: 'Microsoft Edge'
|
||||||
, msedge: t
|
, msedge: t
|
||||||
@ -175,13 +184,6 @@
|
|||||||
, version: versionIdentifier
|
, version: versionIdentifier
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (/vivaldi/i.test(ua)) {
|
|
||||||
result = {
|
|
||||||
name: 'Vivaldi'
|
|
||||||
, vivaldi: t
|
|
||||||
, version: versionIdentifier
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
result = {
|
result = {
|
||||||
name: getFirstMatch(/^(.*)\/(.*) /),
|
name: getFirstMatch(/^(.*)\/(.*) /),
|
||||||
@ -248,6 +250,7 @@
|
|||||||
(result.chrome && result.version >= 20) ||
|
(result.chrome && result.version >= 20) ||
|
||||||
(result.firefox && result.version >= 20.0) ||
|
(result.firefox && result.version >= 20.0) ||
|
||||||
(result.safari && result.version >= 6) ||
|
(result.safari && result.version >= 6) ||
|
||||||
|
(result.vivaldi && result.version >= 1) ||
|
||||||
(result.opera && result.version >= 10.0) ||
|
(result.opera && result.version >= 10.0) ||
|
||||||
(result.ios && result.osversion && result.osversion.split(".")[0] >= 6) ||
|
(result.ios && result.osversion && result.osversion.split(".")[0] >= 6) ||
|
||||||
(result.blackberry && result.version >= 10.1)
|
(result.blackberry && result.version >= 10.1)
|
||||||
|
@ -965,17 +965,17 @@ module.exports.useragents = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
, Vivaldi: {
|
, Vivaldi: {
|
||||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.75 Safari/537.36 Vivaldi/1.0.219.53': {
|
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36 Vivaldi/1.0.303.52': {
|
||||||
vivaldi: true
|
vivaldi: true,
|
||||||
, webkit: true
|
version: '1.0',
|
||||||
, version: '1.0'
|
webkit: true,
|
||||||
, a: true
|
a: true
|
||||||
},
|
},
|
||||||
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.75 Safari/537.36 Vivaldi/1.0.219.50': {
|
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36 Vivaldi/1.0.303.52': {
|
||||||
vivaldi: true
|
vivaldi: true,
|
||||||
, webkit: true
|
version: '1.0',
|
||||||
, version: '1.0'
|
webkit: true,
|
||||||
, a: true
|
a: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
, Generic: {
|
, Generic: {
|
||||||
|
Loading…
Reference in New Issue
Block a user