mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-28 00:18:45 +03:00
Mention the use of Vanilla.js
This commit is contained in:
parent
acfce61942
commit
b7d76f5df0
@ -1,6 +1,6 @@
|
|||||||
# UAParser.js
|
# UAParser.js
|
||||||
|
|
||||||
Lightweight JavaScript-based User-Agent string parser
|
Lightweight JavaScript-based User-Agent string parser. Supports browser & node.js environment. Also available as Component package, Bower package, jQuery plugin, & AMD module
|
||||||
|
|
||||||
[](https://travis-ci.org/faisalman/ua-parser-js)
|
[](https://travis-ci.org/faisalman/ua-parser-js)
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ Lightweight JavaScript-based User-Agent string parser
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
Extract detailed type of web browser, layout engine, operating system, and device purely from user-agent string with relatively lightweight footprint (~7KB minified / ~3KB gzipped).
|
Extract detailed type of web browser, layout engine, operating system, and device purely from user-agent string with relatively lightweight footprint (~7KB minified / ~3KB gzipped). Written in vanilla js (which means it doesn't depends from any other library).
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -134,7 +134,7 @@ $ bower install ua-parser-js
|
|||||||
|
|
||||||
## Using jQuery
|
## Using jQuery
|
||||||
|
|
||||||
If you're using jQuery, `$.ua` object will be created automatically based on browser's user-agent. In case you need, `UAParser` constructor is still present in global though. Getter / setter: `$.ua.get()` / `$.ua.set(uastring)`.
|
Although written in vanilla js (which means it doesn't depends from jQuery), if you're using jQuery, this library will automatically detect and create `$.ua` object based on browser's user-agent. In case you need, `UAParser` constructor is still present in global though. To get/set user-agent you can use: `$.ua.get()` / `$.ua.set(uastring)`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// In browser with default user-agent: 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0':
|
// In browser with default user-agent: 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user