Skip to content
This repository was archived by the owner on Feb 17, 2023. It is now read-only.

Commit 00a868f

Browse files
committed
add Firefox for iOS
1 parent 7445100 commit 00a868f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

all_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,11 @@ var uastrings = []struct {
536536
ua: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/53.0.2785.143 Chrome/53.0.2785.143 Safari/537.36",
537537
expected: "Mozilla:5.0 Platform:X11 OS:Linux x86_64 Browser:Chromium-53.0.2785.143 Engine:AppleWebKit-537.36 Bot:false Mobile:false",
538538
},
539+
{
540+
title: "Firefox for iOS",
541+
ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) FxiOS/1.0 Mobile/12F69 Safari/600.1.4",
542+
expected: "Mozilla:5.0 Platform:iPhone OS:CPU iPhone OS 8_3 like Mac OS X Browser:Firefox-1.0 Engine:AppleWebKit-600.1.4 Bot:false Mobile:true",
543+
},
539544

540545
// Dalvik
541546
{

browser.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ func (p *UserAgent) detectBrowser(sections []section) {
7979
p.browser.Name = "Chrome"
8080
case "Chromium":
8181
p.browser.Name = "Chromium"
82+
case "FxiOS":
83+
p.browser.Name = "Firefox"
8284
default:
8385
p.browser.Name = "Safari"
8486
}

0 commit comments

Comments
 (0)