mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 16:08:47 +03:00
Update to version 2.0.0-alpha.2
This commit is contained in:
parent
6e98b2e975
commit
38a6b53883
BIN
images/companies/aliexpress.png
Normal file
BIN
images/companies/aliexpress.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
BIN
images/companies/github.png
Normal file
BIN
images/companies/github.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
BIN
images/companies/httptoolkit.png
Normal file
BIN
images/companies/httptoolkit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
images/companies/salesforce.png
Normal file
BIN
images/companies/salesforce.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
BIN
images/companies/tokopedia.png
Normal file
BIN
images/companies/tokopedia.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
BIN
images/companies/vercel.png
Normal file
BIN
images/companies/vercel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
88
index.html
88
index.html
@ -4,8 +4,8 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
<meta name="keywords" content="browser detection, user-agent, javascript, detect os, detect mobile tablet, detect device, detect cpu, javascript, nodejs, jquery, typescript" />
|
||||
<title>UAParser.js - Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data using JavaScript. Supports browser & node.js environment. Available as jQuery plugin & @types-ready for TypeScript library.</title>
|
||||
<meta name="keywords" content="browser detection, user-agent, javascript, detect os, detect mobile tablet, detect device, detect cpu, javascript, nodejs, jquery, typescript, client hints" />
|
||||
<title>UAParser.js - Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent & Client-Hints data using JavaScript. Supports browser & node.js environment. Available as jQuery plugin & @types-ready for TypeScript.</title>
|
||||
<link rel="icon" type="image/png" href="images/logo.png">
|
||||
<link rel="stylesheet" type="text/css" href="semantic-ui/semantic.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css">
|
||||
@ -24,7 +24,7 @@
|
||||
</h1>
|
||||
<div class="ui text container">
|
||||
<h2>
|
||||
<p><a href="https://faisalman.github.io/ua-parser-js">{UAParser.js}</a> detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data with relatively small footprint (~17KB minified, ~6KB gzipped) that can be used either in browser (client-side) or node.js (server-side).</p>
|
||||
<p><a href="https://faisalman.github.io/ua-parser-js">{UAParser.js}</a> detect Browser, Engine, OS, CPU, and Device type/model from User-Agent & Client-Hints with relatively small footprint (~17KB minified, ~6KB gzipped) that can be used either in browser (client-side) or node.js (server-side).</p>
|
||||
|
||||
<p>Now, detecting browser is as simple as <mark> ua.getBrowser() </mark>
|
||||
</p></h2>
|
||||
@ -388,6 +388,57 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<img src="images/companies/google.png"/>
|
||||
<div class="ui popup">
|
||||
<div class="ui labeled icon small buttons">
|
||||
<a href="https://github.com/google/tachometer" target="_blank" class="ui green button"><i class="thermometer icon"></i>Tachometer</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<img src="images/companies/httptoolkit.png"/>
|
||||
<div class="ui popup">
|
||||
<div class="ui labeled icon buttons">
|
||||
<a href="https://httptoolkit.com/" target="_blank" class="ui red button"><i class="code icon"></i>HTTP Toolkit UI</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<img src="images/companies/aliexpress.png"/>
|
||||
<div class="ui popup">
|
||||
<div class="ui labeled icon small buttons">
|
||||
<a href="https://www.aliexpress.com" target="_blank" class="ui orange button"><i class="cart icon"></i>AliExpress Website</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<img src="images/companies/vercel.png"/>
|
||||
<div class="ui popup">
|
||||
<div class="ui labeled icon small buttons">
|
||||
<a href="https://github.com/vercel/next.js" target="_blank" class="ui black button"><i class="react icon"></i>Next.js</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<img src="images/companies/gitpod.png"/>
|
||||
<div class="ui popup">
|
||||
<div class="ui labeled icon small buttons">
|
||||
<a href="https://gitpod.io" target="_blank" class="ui teal button"><i class="cube icon"></i>Web-based App</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<img src="images/companies/apple.png"/>
|
||||
<div class="ui popup">
|
||||
<div class="ui labeled icon small buttons">
|
||||
<a href="https://music.apple.com/" target="_blank" class="ui black button"><i class="music icon"></i>Apple Music Website</a>
|
||||
<a href="https://tv.apple.com/" target="_blank" class="ui grey button"><i class="tv icon"></i>Apple TV Website</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<img src="images/companies/discord.png"/>
|
||||
@ -418,6 +469,7 @@
|
||||
<div class="ui popup">
|
||||
<div class="ui labeled icon small buttons">
|
||||
<a href="https://github.com/Shopify/quilt/tree/%40shopify/react-form%400.12.0/packages/browser" target="_blank" class="ui green button"><i class="shopping cart icon"></i>Browser Sniffer</a>
|
||||
<a href="https://github.com/Shopify/blockchain-components/tree/main/packages/connect-wallet" target="_blank" class="ui orange button"><i class="bitcoin icon"></i>Blockchain Components</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -430,11 +482,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<img src="images/companies/apple.png"/>
|
||||
<img src="images/companies/line.png"/>
|
||||
<div class="ui popup">
|
||||
<div class="ui labeled icon small buttons">
|
||||
<a href="https://music.apple.com/" target="_blank" class="ui black button"><i class="music icon"></i>Apple Music Website</a>
|
||||
<a href="https://tv.apple.com/" target="_blank" class="ui grey button"><i class="tv icon"></i>Apple TV Website</a>
|
||||
<a href="https://line.me" target="_blank" class="ui green button"><i class="chat icon"></i>LINE Messenger</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -481,10 +532,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<img src="images/companies/gitpod.png"/>
|
||||
<img src="images/companies/salesforce.png"/>
|
||||
<div class="ui popup">
|
||||
<div class="ui labeled icon small buttons">
|
||||
<a href="https://gitpod.io" target="_blank" class="ui teal button"><i class="cube icon"></i>Web-based App</a>
|
||||
<a href="https://github.com/SalesforceCommerceCloud/pwa-kit" target="_blank" class="ui teal button"><i class="cube icon"></i>PWA Kit</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -585,6 +636,7 @@
|
||||
<div class="ui popup">
|
||||
<div class="ui labeled icon small buttons">
|
||||
<a href="https://www.pinterest.com/" target="_blank" class="ui red button"><i class="pinterest icon"></i>Website</a>
|
||||
<a href="https://github.com/pinterest/gestalt" target="_blank" class="ui black button"><i class="paint brush icon"></i>Gestalt</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -691,14 +743,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<img src="images/companies/line.png"/>
|
||||
<div class="ui popup">
|
||||
<div class="ui labeled icon small buttons">
|
||||
<a href="https://line.me" target="_blank" class="ui green button"><i class="chat icon"></i>LINE Messenger</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<img src="images/companies/olx.png"/>
|
||||
<div class="ui popup">
|
||||
@ -739,6 +783,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<img src="images/companies/tokopedia.png"/>
|
||||
<div class="ui popup">
|
||||
<div class="ui labeled icon small buttons">
|
||||
<a href="https://tiket.tokopedia.com/" target="_blank" class="ui green button"><i class="briefcase icon"></i>Ticket & Travel Page</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
@ -856,8 +908,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui basic centered segment">
|
||||
<h2 class="ui dividing header">Contributors <div class="sub header">Those who collaborate and continuosly improve the code to be awesome</div></h2>
|
||||
<a href="https://github.com/faisalman/ua-parser-js/graphs/contributors"><img class="ui centered image" src="https://contrib.rocks/image?repo=faisalman/ua-parser-js"/></a>
|
||||
<h2 class="ui dividing header">Contributors <div class="sub header">Those who collaborate and continuosly improve this library to be awesome</div></h2>
|
||||
<a href="https://github.com/faisalman/ua-parser-js/graphs/contributors"><img class="ui centered image" src="https://opencollective.com/ua-parser-js/contributors.svg?avatarHeight=64&width=640"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui hidden divider">
|
||||
|
13
js/script.js
13
js/script.js
@ -14,8 +14,7 @@ $(document)
|
||||
rotateLabel();
|
||||
setInterval(rotateLabel, 3000);
|
||||
|
||||
var updateDemo = function (ua) {
|
||||
var result = UAParser(ua);
|
||||
var updateDemo = function (result) {
|
||||
if(!result) return;
|
||||
$('#ua-txt').transition('flip vertical', function () {
|
||||
$(this).text(result.ua);
|
||||
@ -101,7 +100,9 @@ $(document)
|
||||
});
|
||||
});
|
||||
}
|
||||
updateDemo();
|
||||
UAParser().withClientHints().then(function(result) {
|
||||
updateDemo(result);
|
||||
});
|
||||
|
||||
var i;
|
||||
var values = [];
|
||||
@ -112,17 +113,17 @@ $(document)
|
||||
values: values,
|
||||
onChange: function (val) {
|
||||
$('#ua-txt-info').text('For a given user-agent:');
|
||||
updateDemo(val);
|
||||
updateDemo(UAParser(val));
|
||||
}
|
||||
});
|
||||
$('#demo-btn').click(function() {
|
||||
$('#ua-txt-info').text('For a given user-agent:');
|
||||
updateDemo($('input[name=custom-ua]').val());
|
||||
updateDemo(UAParser($('input[name=custom-ua]').val()));
|
||||
});
|
||||
$('input[name=custom-ua]').keypress(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('#ua-txt-info').text('For a given user-agent:');
|
||||
updateDemo($(this).val());
|
||||
updateDemo(UAParser($(this).val()));
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
928
js/ua-parser.js
Executable file → Normal file
928
js/ua-parser.js
Executable file → Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user