1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-08-11 17:14:57 +02:00

migrated utils to ts, exclude filendings in imports

This commit is contained in:
Hakim El Hattab
2025-06-08 21:57:02 +02:00
parent 2cba3fb7db
commit a4130839ee
25 changed files with 1198 additions and 1217 deletions

9
js/utils/device.ts Normal file
View File

@@ -0,0 +1,9 @@
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);