IsAndroidChrome tells if the browser is Chrome for android
()
| 463 | |
| 464 | // IsAndroidChrome tells if the browser is Chrome for android |
| 465 | func IsAndroidChrome() bool { |
| 466 | ua := js.Global().Get("navigator").Get("userAgent").String() |
| 467 | if !strings.Contains(ua, "Android") { |
| 468 | return false |
| 469 | } |
| 470 | if !strings.Contains(ua, "Chrome") { |
| 471 | return false |
| 472 | } |
| 473 | return true |
| 474 | } |
| 475 | |
| 476 | // GetKeyName returns the string returned from the given Key. So you can write "Press W to move forward" |
| 477 | // and get a W for QWERTY and Z for AZERTY |