mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 07:58:45 +03:00
Add new Webkit Opera
This commit is contained in:
parent
40ac5c5bc3
commit
615d6a2034
@ -1,7 +1,7 @@
|
||||
{
|
||||
"title": "UA-Parser.JS",
|
||||
"name": "ua-parser-js",
|
||||
"version": "0.5.14",
|
||||
"version": "0.5.15",
|
||||
"author": "Faisal Salman <fyzlman@gmail.com> (http://faisalman.com)",
|
||||
"description": "Lightweight JavaScript-based user-agent string parser",
|
||||
"keywords": [
|
||||
|
10
test.js
10
test.js
@ -462,6 +462,16 @@ var browsers = [
|
||||
major : '11'
|
||||
}
|
||||
},
|
||||
{
|
||||
desc : 'Opera Webkit',
|
||||
ua : 'Mozilla/5.0 AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.123 Mobile Safari/537.22 OPR/14.0.1025.52315',
|
||||
expect :
|
||||
{
|
||||
name : 'Opera',
|
||||
version : '14.0.1025.52315',
|
||||
major : '14'
|
||||
}
|
||||
},
|
||||
{
|
||||
desc : 'Opera Mini',
|
||||
ua : 'Opera/9.80 (J2ME/MIDP; Opera Mini/5.1.21214/19.916; U; en) Presto/2.5.25',
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"title": "UA-Parser.JS",
|
||||
"name": "ua-parser-js",
|
||||
"version": "0.5.14",
|
||||
"version": "0.5.15",
|
||||
"description": "Lightweight JavaScript-based user-agent string parser",
|
||||
"keywords": [
|
||||
"user-agent",
|
||||
|
@ -1,4 +1,4 @@
|
||||
// UA-Parser.JS v0.5.14
|
||||
// UA-Parser.JS v0.5.15
|
||||
// Lightweight JavaScript-based User-Agent string parser
|
||||
// https://github.com/faisalman/ua-parser-js
|
||||
//
|
||||
@ -156,6 +156,11 @@
|
||||
/(opera\s[mobiletab]+).+version\/((\d+)?[\w\.-]+)/i, // Opera Mobi/Tablet
|
||||
/(opera).+version\/((\d+)?[\w\.]+)/i, // Opera > 9.80
|
||||
/(opera)[\/\s]+((\d+)?[\w\.]+)/i, // Opera < 9.80
|
||||
|
||||
], [NAME, VERSION, MAJOR], [
|
||||
|
||||
/\s(opr)\/((\d+)?[\w\.]+)/i // Opera Webkit
|
||||
], [[NAME, 'Opera'], VERSION, MAJOR], [
|
||||
|
||||
// Mixed
|
||||
/(kindle)\/((\d+)?[\w\.]+)/i, // Kindle
|
||||
|
4
ua-parser.min.js
vendored
4
ua-parser.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user