From 63f73ddd7580b3b76aa554c8022d57bf89d85cae Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 10 Nov 2019 16:52:47 +0900 Subject: [PATCH] web: Bug fix: iPad was not recognized as iOS Fixes #979 --- internal/web/js.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/internal/web/js.go b/internal/web/js.go index 14750d982..9db61a059 100644 --- a/internal/web/js.go +++ b/internal/web/js.go @@ -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 {