mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 07:58:45 +03:00
Fix error build
This commit is contained in:
parent
a2b4f6d5c5
commit
6d183003b3
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"title": "UA-Parser.JS",
|
"title": "UA-Parser.JS",
|
||||||
"name": "ua-parser-js",
|
"name": "ua-parser-js",
|
||||||
"version": "0.4.14",
|
"version": "0.4.15",
|
||||||
"author": "Faisal Salman <fyzlman@gmail.com> (http://faisalman.com)",
|
"author": "Faisal Salman <fyzlman@gmail.com> (http://faisalman.com)",
|
||||||
"description": "Lightweight JavaScript-based user-agent string parser",
|
"description": "Lightweight JavaScript-based user-agent string parser",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -7,6 +7,8 @@ Lightweight JavaScript-based User-Agent string parser
|
|||||||
* Source : https://github.com/faisalman/ua-parser-js
|
* Source : https://github.com/faisalman/ua-parser-js
|
||||||
* License : GPLv2 & MIT
|
* License : GPLv2 & MIT
|
||||||
|
|
||||||
|
[](https://travis-ci.org/faisalman/ua-parser-js)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
Extract detailed type of web browser, layout engine, operating system, and device purely from user-agent string.
|
Extract detailed type of web browser, layout engine, operating system, and device purely from user-agent string.
|
||||||
@ -74,7 +76,7 @@ Extract detailed type of web browser, layout engine, operating system, and devic
|
|||||||
## Using node.js
|
## Using node.js
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install ua-parser-js
|
$ npm install ua-parser-js
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
16
ua-parser.js
16
ua-parser.js
@ -1,4 +1,4 @@
|
|||||||
// UA-Parser.JS v0.4.14
|
// UA-Parser.JS v0.4.15
|
||||||
// Lightweight JavaScript-based User-Agent string parser
|
// Lightweight JavaScript-based User-Agent string parser
|
||||||
// https://github.com/faisalman/ua-parser-js
|
// https://github.com/faisalman/ua-parser-js
|
||||||
//
|
//
|
||||||
@ -125,13 +125,13 @@
|
|||||||
|
|
||||||
// Presto based
|
// Presto based
|
||||||
/(opera\smini)\/((\d+)?[\w\.-]+)/i, // Opera Mini
|
/(opera\smini)\/((\d+)?[\w\.-]+)/i, // Opera Mini
|
||||||
/(opera\smobi)\/((\d+)?[\w\.-]+)/i, // Opera Mobile
|
/(opera\smobi).+version\/((\d+)?[\w\.-]+)/i, // Opera Mobile
|
||||||
/(opera).+version\/((\d+)?[\w\.]+)/i, // Opera > 9.80
|
/(opera).+version\/((\d+)?[\w\.]+)/i, // Opera > 9.80
|
||||||
/(opera)[\/\s]+((\d+)?[\w\.]+)/i, // Opera < 9.80
|
/(opera)[\/\s]+((\d+)?[\w\.]+)/i, // Opera < 9.80
|
||||||
|
|
||||||
// Mixed
|
// Mixed
|
||||||
/(kindle)\/((\d+)?[\w\.]+)/i, // Kindle
|
/(kindle)\/((\d+)?[\w\.]+)/i, // Kindle
|
||||||
/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?((\d+)?[\w\.]+)/i,
|
/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?((\d+)?[\w\.]+)*/i,
|
||||||
// Lunascape/Maxthon/Netfront/Jasmine/Blazer
|
// Lunascape/Maxthon/Netfront/Jasmine/Blazer
|
||||||
|
|
||||||
// Trident based
|
// Trident based
|
||||||
@ -162,13 +162,17 @@
|
|||||||
], ['name', ['major', mapper.string, maps.browser.oldsafari.major], ['version', mapper.string, maps.browser.oldsafari.version]], [
|
], ['name', ['major', mapper.string, maps.browser.oldsafari.major], ['version', mapper.string, maps.browser.oldsafari.version]], [
|
||||||
|
|
||||||
/(konqueror)\/((\d+)?[\w\.]+)/i, // Konqueror
|
/(konqueror)\/((\d+)?[\w\.]+)/i, // Konqueror
|
||||||
/(applewebkit|khtml)\/((\d+)?[\w\.]+)/i,
|
/(applewebkit|khtml)\/((\d+)?[\w\.]+)/i
|
||||||
|
], ['name', 'version', 'major'], [
|
||||||
|
|
||||||
// Gecko based
|
// Gecko based
|
||||||
|
/(navigator|netscape)\/((\d+)?[\w\.-]+)/i // Netscape
|
||||||
|
], [['name', 'Netscape'], 'version', 'major'], [
|
||||||
|
/(swiftfox)/i, // Swiftfox
|
||||||
/(iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo)[\/\s]?((\d+)?[\w\.\+]+)/i,
|
/(iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo)[\/\s]?((\d+)?[\w\.\+]+)/i,
|
||||||
// Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo
|
// Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo
|
||||||
/(firefox|seamonkey|netscape|navigator|k-meleon|icecat|iceape|firebird|phoenix)\/((\d+)?[\w\.]+)/i,
|
/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/((\d+)?[\w\.-]+)/i,
|
||||||
// Firefox/SeaMonkey/Netscape/K-Meleon/IceCat/IceApe/Firebird/Phoenix
|
// Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
|
||||||
/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i, // Mozilla
|
/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i, // Mozilla
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
|
Loading…
x
Reference in New Issue
Block a user