This repository was archived by the owner on Feb 17, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -476,6 +476,11 @@ var uastrings = []struct {
476
476
ua : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/92.0.4515.107 Safari/537.36" ,
477
477
expected : "Mozilla:5.0 Platform:X11 OS:Linux x86_64 Browser:Headless Chrome-92.0.4515.107 Engine:AppleWebKit-537.36 Bot:false Mobile:false" ,
478
478
},
479
+ {
480
+ title : "PhantomJS" ,
481
+ ua : "Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1" ,
482
+ expected : "Mozilla:5.0 Platform:Unknown OS:Linux x86_64 Browser:PhantomJS-2.1.1 Engine:AppleWebKit-538.1 Bot:false Mobile:false" ,
483
+ },
479
484
{
480
485
title : "SafariMac" ,
481
486
ua : "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16" ,
Original file line number Diff line number Diff line change @@ -101,6 +101,9 @@ func (p *UserAgent) detectBrowser(sections []section) {
101
101
case "DuckDuckGo" :
102
102
p .browser .Name = "DuckDuckGo"
103
103
p .browser .Version = sections [slen - 2 ].version
104
+ case "PhantomJS" :
105
+ p .browser .Name = "PhantomJS"
106
+ p .browser .Version = sections [slen - 2 ].version
104
107
default :
105
108
switch sections [sectionIndex ].name {
106
109
case "Chrome" , "CriOS" :
You can’t perform that action at this time.
0 commit comments