mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 07:58:45 +03:00
Improve OS detection: Windows Server series
This commit is contained in:
parent
a9378427ed
commit
86b3cd37e2
@ -950,7 +950,7 @@
|
|||||||
], [[NAME, /N/, 'R'], [VERSION, strMapper, windowsVersionMap]], [
|
], [[NAME, /N/, 'R'], [VERSION, strMapper, windowsVersionMap]], [
|
||||||
/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i, // Windows IoT/Mobile/Phone
|
/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i, // Windows IoT/Mobile/Phone
|
||||||
// Windows NT/3.1/95/98/ME/2000/XP/Vista/7/8/8.1/10/11
|
// Windows NT/3.1/95/98/ME/2000/XP/Vista/7/8/8.1/10/11
|
||||||
/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|vista|xp)/i
|
/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i
|
||||||
], [NAME, VERSION], [
|
], [NAME, VERSION], [
|
||||||
/windows nt ?([\d\.\)]*)(?!.+xbox)/i,
|
/windows nt ?([\d\.\)]*)(?!.+xbox)/i,
|
||||||
/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i
|
/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i
|
||||||
|
@ -242,6 +242,15 @@
|
|||||||
"version" : "7"
|
"version" : "7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Windows 7",
|
||||||
|
"ua" : "Mozilla/5.0 (Windows 7 Enterprise; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6099.71 Safari/537.36",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Windows",
|
||||||
|
"version" : "7"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "Windows 7",
|
"desc" : "Windows 7",
|
||||||
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)",
|
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)",
|
||||||
@ -278,6 +287,15 @@
|
|||||||
"version" : "10"
|
"version" : "10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"desc" : "Windows Server 2012 R2",
|
||||||
|
"ua" : "Mozilla/5.0 (Windows Server 2012 R2 Standard; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5975.80 Safari/537.36",
|
||||||
|
"expect" :
|
||||||
|
{
|
||||||
|
"name" : "Windows",
|
||||||
|
"version" : "Server 2012 R2"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"desc" : "WeChat Desktop for Windows Built-in Browser",
|
"desc" : "WeChat Desktop for Windows Built-in Browser",
|
||||||
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI WindowsWechat QBCore/3.43.901.400 QQBrowser/9.0.2524.400",
|
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI WindowsWechat QBCore/3.43.901.400 QQBrowser/9.0.2524.400",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user