Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(597)

Unified Diff: ui/webui/resources/js/cr.js

Issue 2103883005: Add cr.isIos for features that only apply on iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ea17af8429a9ae6ce07d67e571ba9c6a293e7592 100644
--- a/ui/webui/resources/js/cr.js
+++ b/ui/webui/resources/js/cr.js
@@ -475,6 +475,11 @@ var cr = cr || function() {
/** Whether this is on Android. */
get isAndroid() {
return /Android/.test(navigator.userAgent);
- }
+ },
+
+ /** Whether this is on iOS. */
+ get isIos() {
+ return /iPad|iPhone|iPod/.test(navigator.userAgent);
+ },
};
}();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698