mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 16:08:47 +03:00
commit
c4b6742ea0
@ -207,7 +207,7 @@
|
||||
/(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
|
||||
@ -374,6 +374,7 @@
|
||||
/android\s3\.[\s\w-;]{10}(lg?)-([06cv9]{3,4})/i // LG
|
||||
], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [
|
||||
/((nexus\s4))/i,
|
||||
/((nexus\s5))/i,
|
||||
/(lg)[e;\s-\/]+(\w+)*/i
|
||||
], [[VENDOR, 'LG'], MODEL, [TYPE, MOBILE]], [
|
||||
|
||||
@ -508,7 +509,7 @@
|
||||
//////////
|
||||
|
||||
|
||||
// check js environment
|
||||
// check js environment
|
||||
if (typeof(exports) !== UNDEF_TYPE) {
|
||||
// nodejs env
|
||||
if (typeof(module) !== UNDEF_TYPE && module.exports) {
|
||||
@ -517,7 +518,7 @@
|
||||
exports.UAParser = UAParser;
|
||||
} else {
|
||||
// browser env
|
||||
window.UAParser = UAParser;
|
||||
window.UAParser = UAParser;
|
||||
// requirejs env (optional)
|
||||
if (typeof(define) === FUNC_TYPE && define.amd) {
|
||||
define(function () {
|
||||
|
2
src/ua-parser.min.js
vendored
2
src/ua-parser.min.js
vendored
File diff suppressed because one or more lines are too long
@ -19,6 +19,16 @@
|
||||
"type" : "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "LG Nexus 5",
|
||||
"ua" : "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19",
|
||||
"expect" :
|
||||
{
|
||||
"vendor" : "LG",
|
||||
"model" : "Nexus 5",
|
||||
"type" : "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Motorola Droid RAZR 4G",
|
||||
"ua" : "Mozilla/5.0 (Linux; U; Android 2.3; xx-xx; DROID RAZR 4G Build/6.5.1-73_DHD-11_M1-29) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user