Improve os detection: Windows Mobile without version

This commit is contained in:
Faisal Salman 2021-04-12 12:55:37 +07:00
parent 559ecaacb6
commit c53a2a1f72
2 changed files with 13 additions and 4 deletions

View File

@ -690,8 +690,8 @@
/microsoft (windows) (vista|xp)/i // Windows (iTunes) /microsoft (windows) (vista|xp)/i // Windows (iTunes)
], [NAME, VERSION], [ ], [NAME, VERSION], [
/(windows) nt 6\.2; (arm)/i, // Windows RT /(windows) nt 6\.2; (arm)/i, // Windows RT
/(windows phone(?: os)*)[\s\/]?([\d\.\s\w]*)/i, // Windows Phone /(windows (?:phone(?: os)?|mobile))[\s\/]?([\d\.\s\w]*)/i, // Windows Phone
/(windows mobile|windows)[\s\/]?([ntce\d\.\s]+[\w\.]+)(?!.+xbox)/i /(windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i
], [NAME, [VERSION, strMapper, windowsVersionMap]], [ ], [NAME, [VERSION, strMapper, windowsVersionMap]], [
/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i /(win(?=3|9|n)|win 9x )([nt\d\.]+)/i
], [[NAME, 'Windows'], [VERSION, strMapper, windowsVersionMap]], [ ], [[NAME, 'Windows'], [VERSION, strMapper, windowsVersionMap]], [

View File

@ -107,6 +107,15 @@
"version" : "6.1" "version" : "6.1"
} }
}, },
{
"desc" : "Windows Mobile",
"ua" : "Opera/9.80 (Windows Mobile; WCE; Opera Mobi/WMD-50433; U; en) Presto/2.4.13 Version/10.00",
"expect" :
{
"name" : "Windows Mobile",
"version" : "undefined"
}
},
{ {
"desc" : "Windows Phone", "desc" : "Windows Phone",
"ua" : "Opera/9.80 (Windows Phone; Opera Mini/7.6.8/35.7518; U; ru) Presto/2.8.119 Version/11.10", "ua" : "Opera/9.80 (Windows Phone; Opera Mini/7.6.8/35.7518; U; ru) Presto/2.8.119 Version/11.10",
@ -140,7 +149,7 @@
"expect" : "expect" :
{ {
"name" : "Windows", "name" : "Windows",
"version" : "NT x.y" "version" : "NT x"
} }
}, },
{ {
@ -149,7 +158,7 @@
"expect" : "expect" :
{ {
"name" : "Windows", "name" : "Windows",
"version" : "NT x.y" "version" : "NT x"
} }
}, },
{ {