소스 검색

Merge pull request #1355 from huangyan321/fix-isMobile

fix: expand user-agent check for mobile devices
DIYgod 1 년 전
부모
커밋
7977068e35
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/js/utils.js

+ 1 - 1
src/js/utils.js

@@ -1,4 +1,4 @@
-const isMobile = /mobile/i.test(window.navigator.userAgent);
+const isMobile = /mobile|android|iphone|ipod|phone|ipad/i.test(window.navigator.userAgent);
 
 const utils = {
     /**