Skip to content

Commit faf481e

Browse files
Add files via upload
1 parent 1c5a14c commit faf481e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

js/utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,5 +183,8 @@ export function rgbToHex(r, g, b) {
183183
}
184184

185185
export function isMobile() {
186-
return window.innerWidth < 500;
186+
return (
187+
/Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ||
188+
(navigator.userAgentData?.mobile ?? false)
189+
);
187190
}

0 commit comments

Comments
 (0)