You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
715 B
24 lines
715 B
// Copyright (c) 2019 Sarin Na Wangkanai, All Rights Reserved.
|
|
// The Apache v2. See License.txt in the project root for license information.
|
|
|
|
namespace Wood.Util.Browser
|
|
{
|
|
public class Safari : BaseBrowser
|
|
{
|
|
private readonly string _agent;
|
|
|
|
public Safari(string agent)
|
|
{
|
|
_agent = agent.ToLower();
|
|
var safari = BrowserType.Safari.ToString().ToLower();
|
|
|
|
if (_agent.Contains(safari))
|
|
{
|
|
var first = _agent.IndexOf(safari);
|
|
var version = _agent.Substring(first + safari.Length + 1);
|
|
Version = ToVersion(version);
|
|
Type = BrowserType.Safari;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|