wireguard-reverse-proxy/reveal.js-master/js/utils/device.js

8 lines
308 B
JavaScript
Raw Permalink Normal View History

2023-08-26 21:15:45 +00:00
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 );