mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
Add macOS Big Sur
This commit is contained in:
parent
f09411489c
commit
4995026d5d
31
src/utils.js
31
src/utils.js
@ -66,6 +66,7 @@ export default class Utils {
|
||||
* 10.13 - High Sierra
|
||||
* 10.14 - Mojave
|
||||
* 10.15 - Catalina
|
||||
* 11 - Big Sur
|
||||
*
|
||||
* @example
|
||||
* getMacOSVersionName("10.14") // 'Mojave'
|
||||
@ -76,19 +77,23 @@ export default class Utils {
|
||||
static getMacOSVersionName(version) {
|
||||
const v = version.split('.').splice(0, 2).map(s => parseInt(s, 10) || 0);
|
||||
v.push(0);
|
||||
if (v[0] !== 10) return undefined;
|
||||
switch (v[1]) {
|
||||
case 5: return 'Leopard';
|
||||
case 6: return 'Snow Leopard';
|
||||
case 7: return 'Lion';
|
||||
case 8: return 'Mountain Lion';
|
||||
case 9: return 'Mavericks';
|
||||
case 10: return 'Yosemite';
|
||||
case 11: return 'El Capitan';
|
||||
case 12: return 'Sierra';
|
||||
case 13: return 'High Sierra';
|
||||
case 14: return 'Mojave';
|
||||
case 15: return 'Catalina';
|
||||
switch (v[0]) {
|
||||
case 10:
|
||||
switch (v[1]) {
|
||||
case 5: return 'Leopard';
|
||||
case 6: return 'Snow Leopard';
|
||||
case 7: return 'Lion';
|
||||
case 8: return 'Mountain Lion';
|
||||
case 9: return 'Mavericks';
|
||||
case 10: return 'Yosemite';
|
||||
case 11: return 'El Capitan';
|
||||
case 12: return 'Sierra';
|
||||
case 13: return 'High Sierra';
|
||||
case 14: return 'Mojave';
|
||||
case 15: return 'Catalina';
|
||||
default: return undefined;
|
||||
}
|
||||
case 11: return 'Big Sur';
|
||||
default: return undefined;
|
||||
}
|
||||
}
|
||||
|
@ -336,6 +336,20 @@
|
||||
type: "tv"
|
||||
engine:
|
||||
name: "Blink"
|
||||
- ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36"
|
||||
spec:
|
||||
browser:
|
||||
name: "Chrome"
|
||||
version: "87.0.4280.67"
|
||||
os:
|
||||
name: "macOS"
|
||||
version: "11.0.1"
|
||||
versionName: "Big Sur"
|
||||
platform:
|
||||
type: "desktop"
|
||||
vendor: "Apple"
|
||||
engine:
|
||||
name: "Blink"
|
||||
Google Search:
|
||||
-
|
||||
ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 12_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/83.0.268992909 Mobile/15E148 Safari/605.1"
|
||||
|
Loading…
Reference in New Issue
Block a user