talk-end-of-procrastination/js/utils/device.js
Dejvino d3771ec49d Squashed commits from https://github.com/hakimel/reveal.js
Last commit:
commit e1c180565e48ae1b595f44edef319872262a99c7
Merge: b8d97d2 f2b0316
Author: Hakim El Hattab <hakim.elhattab@gmail.com>
Date:   Wed Aug 9 15:17:25 2023 +0200

    Merge pull request #3445 from t-fritsch/fix-scss-watch-tasks

    fix scss watch tasks broken on syntax error
2023-08-20 06:07:58 +02:00

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