fix: noncompliant Firefox User-Agents (#10492)
This commit is contained in:
parent
854f321532
commit
5a8010cf4f
|
|
@ -784,7 +784,7 @@
|
||||||
"defaultBrowserType": "webkit"
|
"defaultBrowserType": "webkit"
|
||||||
},
|
},
|
||||||
"JioPhone 2": {
|
"JioPhone 2": {
|
||||||
"userAgent": "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:89.0 Gecko/48.0 Firefox/94.0.1 KAIOS/2.5",
|
"userAgent": "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:94.0.1) Gecko/48.0 Firefox/94.0.1 KAIOS/2.5",
|
||||||
"viewport": {
|
"viewport": {
|
||||||
"width": 240,
|
"width": 240,
|
||||||
"height": 320
|
"height": 320
|
||||||
|
|
@ -795,7 +795,7 @@
|
||||||
"defaultBrowserType": "firefox"
|
"defaultBrowserType": "firefox"
|
||||||
},
|
},
|
||||||
"JioPhone 2 landscape": {
|
"JioPhone 2 landscape": {
|
||||||
"userAgent": "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:89.0 Gecko/48.0 Firefox/94.0.1 KAIOS/2.5",
|
"userAgent": "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:94.0.1) Gecko/48.0 Firefox/94.0.1 KAIOS/2.5",
|
||||||
"viewport": {
|
"viewport": {
|
||||||
"width": 320,
|
"width": 320,
|
||||||
"height": 240
|
"height": 240
|
||||||
|
|
@ -1292,7 +1292,7 @@
|
||||||
"defaultBrowserType": "chromium"
|
"defaultBrowserType": "chromium"
|
||||||
},
|
},
|
||||||
"Desktop Firefox HiDPI": {
|
"Desktop Firefox HiDPI": {
|
||||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0 Gecko/20100101 Firefox/94.0.1",
|
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0.1) Gecko/20100101 Firefox/94.0.1",
|
||||||
"screen": {
|
"screen": {
|
||||||
"width": 1792,
|
"width": 1792,
|
||||||
"height": 1120
|
"height": 1120
|
||||||
|
|
@ -1352,7 +1352,7 @@
|
||||||
"defaultBrowserType": "chromium"
|
"defaultBrowserType": "chromium"
|
||||||
},
|
},
|
||||||
"Desktop Firefox": {
|
"Desktop Firefox": {
|
||||||
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0 Gecko/20100101 Firefox/94.0.1",
|
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0.1) Gecko/20100101 Firefox/94.0.1",
|
||||||
"screen": {
|
"screen": {
|
||||||
"width": 1920,
|
"width": 1920,
|
||||||
"height": 1080
|
"height": 1080
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ async function run() {
|
||||||
devicesDescriptors[deviceName].userAgent = devicesDescriptors[deviceName].userAgent.replace(
|
devicesDescriptors[deviceName].userAgent = devicesDescriptors[deviceName].userAgent.replace(
|
||||||
/^(.*Firefox\/)(.*?)( .*?)?$/,
|
/^(.*Firefox\/)(.*?)( .*?)?$/,
|
||||||
`$1${versions.firefox}$3`
|
`$1${versions.firefox}$3`
|
||||||
).replace(/(.*rv:)(.*)\)(.*?)/, `$1${versions.firefox}$3`)
|
).replace(/^(.*rv:)(.*)(\).*?)$/, `$1${versions.firefox}$3`)
|
||||||
break;
|
break;
|
||||||
case 'webkit':
|
case 'webkit':
|
||||||
devicesDescriptors[deviceName].userAgent = devicesDescriptors[deviceName].userAgent.replace(
|
devicesDescriptors[deviceName].userAgent = devicesDescriptors[deviceName].userAgent.replace(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue