summaryrefslogtreecommitdiff
path: root/2024-06-18-guix-social/reveal.js/js/utils/device.js
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2024-06-24 13:49:08 -0400
committerDavid Thompson <dthompson2@worcester.edu>2024-06-24 13:52:17 -0400
commitd283f7e661e14d6ae1881fe803e5b4f1ed0689ff (patch)
tree84d3811c6dcb7d7f02aecadad7b2dfacce83bd4f /2024-06-18-guix-social/reveal.js/js/utils/device.js
parent3d9dcd3099fb252fa35697148fbbd541eb9eecc9 (diff)
Add 2024 Guix social talk.HEADmaster
Diffstat (limited to '2024-06-18-guix-social/reveal.js/js/utils/device.js')
-rw-r--r--2024-06-18-guix-social/reveal.js/js/utils/device.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/2024-06-18-guix-social/reveal.js/js/utils/device.js b/2024-06-18-guix-social/reveal.js/js/utils/device.js
new file mode 100644
index 0000000..f2bce20
--- /dev/null
+++ b/2024-06-18-guix-social/reveal.js/js/utils/device.js
@@ -0,0 +1,8 @@
+const UA = navigator.userAgent;
+
+export const isMobile = /(iphone|ipod|ipad|android)/gi.test( UA ) ||
+ ( navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 ); // iPadOS
+
+export const isChrome = /chrome/i.test( UA ) && !/edge/i.test( UA );
+
+export const isAndroid = /android/gi.test( UA ); \ No newline at end of file