From d283f7e661e14d6ae1881fe803e5b4f1ed0689ff Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 24 Jun 2024 13:49:08 -0400 Subject: Add 2024 Guix social talk. --- 2024-06-18-guix-social/reveal.js/js/utils/device.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 2024-06-18-guix-social/reveal.js/js/utils/device.js (limited to '2024-06-18-guix-social/reveal.js/js/utils/device.js') 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 -- cgit v1.2.3