OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * The global object. | 6 * The global object. |
7 * @type {!Object} | 7 * @type {!Object} |
8 * @const | 8 * @const |
9 */ | 9 */ |
10 var global = this; | 10 var global = this; |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
469 | 469 |
470 /** Whether this is on vanilla Linux (not chromeOS). */ | 470 /** Whether this is on vanilla Linux (not chromeOS). */ |
471 get isLinux() { | 471 get isLinux() { |
472 return /Linux/.test(navigator.userAgent); | 472 return /Linux/.test(navigator.userAgent); |
473 }, | 473 }, |
474 | 474 |
475 /** Whether this is on Android. */ | 475 /** Whether this is on Android. */ |
476 get isAndroid() { | 476 get isAndroid() { |
477 return /Android/.test(navigator.userAgent); | 477 return /Android/.test(navigator.userAgent); |
478 } | 478 } |
479 | |
480 /** Whether this is on iOS. */ | |
481 get isIOS() { | |
482 return navigator.platform === 'iPhone' || navigator.platform === 'iPad'; | |
dpapad
2016/07/11 20:45:33
Can we make these comparisons a bit less fragile a
Eugene But (OOO till 7-30)
2016/07/11 21:43:12
Done.
| |
483 } | |
479 }; | 484 }; |
480 }(); | 485 }(); |
OLD | NEW |