Fix #279 Remap old Edge versions <= 44 as suggested by @mikemaccana @callaginn

This commit is contained in:
Faisal Salman 2021-03-24 00:09:49 +07:00
parent effd766e3b
commit dff9746527
2 changed files with 35 additions and 4 deletions

View File

@ -169,6 +169,17 @@
'2.0.4' : '/419', '2.0.4' : '/419',
'?' : '/' '?' : '/'
} }
},
oldEdge : {
version : {
'0.1' : '12.',
'21' : '13.',
'31' : '14.',
'39' : '15.',
'41' : '16.',
'42' : '17.',
'44' : '18.'
}
} }
}, },
@ -221,7 +232,7 @@
/(?:android.+crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS /(?:android.+crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS
], [VERSION, [NAME, 'Chrome']], [ ], [VERSION, [NAME, 'Chrome']], [
/(?:edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i // Microsoft Edge /(?:edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i // Microsoft Edge
], [VERSION, [NAME, 'Edge']], [ ], [[VERSION, mapper.str, maps.browser.oldEdge.version], [NAME, 'Edge']], [
// Presto based // Presto based
/(opera\smini)\/([\w\.-]+)/i, // Opera Mini /(opera\smini)\/([\w\.-]+)/i, // Opera Mini

View File

@ -1109,13 +1109,33 @@
} }
}, },
{ {
"desc" : "Microsoft Edge", "desc" : "Microsoft Edge 0.1",
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0", "ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0",
"expect" : "expect" :
{ {
"name" : "Edge", "name" : "Edge",
"version" : "12.0", "version" : "0.1",
"major" : "12" "major" : "0"
}
},
{
"desc" : "Microsoft Edge 44",
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134",
"expect" :
{
"name" : "Edge",
"version" : "42",
"major" : "42"
}
},
{
"desc" : "Microsoft Edge 44",
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763",
"expect" :
{
"name" : "Edge",
"version" : "44",
"major" : "44"
} }
}, },
{ {