Skip to content

Commit e312298

Browse files
committed
Fix #794: Detect Windows 7
1 parent 5e7d0b2 commit e312298

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/main/ua-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@
943943
os : [[
944944

945945
// Windows
946-
/microsoft (windows) (vista|xp)/i // Windows (iTunes)
946+
/microsoft (windows) (7|vista|xp)/i // Windows
947947
], [NAME, VERSION], [
948948
/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i // Windows Phone
949949
], [NAME, [VERSION, strMapper, windowsVersionMap]], [

test/data/ua/os/windows.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@
5353
"version" : "Vista"
5454
}
5555
},
56+
{
57+
"desc" : "Windows 7",
58+
"ua" : "Microsoft Windows 7",
59+
"expect" :
60+
{
61+
"name" : "Windows",
62+
"version" : "7"
63+
}
64+
},
5665
{
5766
"desc" : "Windows 7",
5867
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)",

0 commit comments

Comments
 (0)