web: Bug fix: iPad was not recognized as iOS

Fixes #979
This commit is contained in:
Hajime Hoshi 2019-11-10 16:52:47 +09:00
parent a89e07f913
commit e95dc5f27a

View File

@ -33,17 +33,8 @@ var (
)
func init() {
isIOSSafari = strings.Contains(userAgent, "iPhone")
if !strings.Contains(userAgent, "Android") {
isAndroidChrome = false
return
}
if !strings.Contains(userAgent, "Chrome") {
isAndroidChrome = false
return
}
isAndroidChrome = true
isIOSSafari = strings.Contains(userAgent, "iPhone") || strings.Contains(userAgent, "iPad")
isAndroidChrome = strings.Contains(userAgent, "Android") && strings.Contains(userAgent, "Chrome")
}
func IsIOSSafari() bool {