ulaval-ppr-principes-fair/reveal.js/js/utils/device.js
2023-11-27 00:15:21 -05:00

8 lines
No EOL
308 B
JavaScript

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 );