mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 13:07:26 +01:00
web: Remove unused functions
This commit is contained in:
parent
097c8e66e1
commit
5d8c39028c
@ -24,25 +24,16 @@ func IsBrowser() bool {
|
||||
}
|
||||
|
||||
var (
|
||||
userAgent = js.Global().Get("navigator").Get("userAgent").String()
|
||||
|
||||
isIOSSafari bool
|
||||
isAndroidChrome bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
userAgent := js.Global().Get("navigator").Get("userAgent").String()
|
||||
isIOSSafari = strings.Contains(userAgent, "iPhone") || strings.Contains(userAgent, "iPad")
|
||||
isAndroidChrome = strings.Contains(userAgent, "Android") && strings.Contains(userAgent, "Chrome")
|
||||
}
|
||||
|
||||
func IsIOSSafari() bool {
|
||||
return isIOSSafari
|
||||
}
|
||||
|
||||
func IsAndroidChrome() bool {
|
||||
return isAndroidChrome
|
||||
}
|
||||
|
||||
func IsMobileBrowser() bool {
|
||||
return IsIOSSafari() || IsAndroidChrome()
|
||||
return isIOSSafari || isAndroidChrome
|
||||
}
|
||||
|
@ -20,14 +20,6 @@ func IsBrowser() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func IsIOSSafari() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func IsAndroidChrome() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func IsMobileBrowser() bool {
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user