update packages and add valign
This commit is contained in:
9
scripts/reveal.js/js/utils/device.ts
Normal file
9
scripts/reveal.js/js/utils/device.ts
Normal 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);
|
||||
Reference in New Issue
Block a user