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

Commit

Permalink
add Firefox for iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
snackmgmg committed Sep 19, 2019
1 parent 7445100 commit 00a868f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,11 @@ var uastrings = []struct {
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",
expected: "Mozilla:5.0 Platform:X11 OS:Linux x86_64 Browser:Chromium-53.0.2785.143 Engine:AppleWebKit-537.36 Bot:false Mobile:false",
},
{
title: "Firefox for iOS",
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",
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",
},

// Dalvik
{
Expand Down
2 changes: 2 additions & 0 deletions browser.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ func (p *UserAgent) detectBrowser(sections []section) {
p.browser.Name = "Chrome"
case "Chromium":
p.browser.Name = "Chromium"
case "FxiOS":
p.browser.Name = "Firefox"
default:
p.browser.Name = "Safari"
}
Expand Down

0 comments on commit 00a868f

Please sign in to comment.