Chromium Code Reviews| Index: ui/webui/resources/js/cr.js |
| diff --git a/ui/webui/resources/js/cr.js b/ui/webui/resources/js/cr.js |
| index 090cfd94f7d7067fbfeca0ed4e0a44c97294d7a9..ab30bf9cc9ae6aed326951eb4e6e750187595f54 100644 |
| --- a/ui/webui/resources/js/cr.js |
| +++ b/ui/webui/resources/js/cr.js |
| @@ -476,5 +476,10 @@ var cr = cr || function() { |
| get isAndroid() { |
| return /Android/.test(navigator.userAgent); |
| } |
| + |
| + /** Whether this is on iOS. */ |
| + get isIOS() { |
| + return /(iPhone|iPad)/.test(navigator.platform); |
|
Dan Beam
2016/07/11 21:49:05
why do you need capturing parens?
/iPhone|iPad/ s
Dan Beam
2016/07/11 21:50:15
also, do we run on iPod? mine had that in it ;)
h
Eugene But (OOO till 7-30)
2016/07/11 22:00:54
Done.
Eugene But (OOO till 7-30)
2016/07/11 22:00:54
Good catch.
|
| + } |
| }; |
| }(); |