Browse Source

Merge pull request #1355 from huangyan321/fix-isMobile

fix: expand user-agent check for mobile devices
DIYgod 1 year ago
parent
commit
7977068e35
1 changed files with 1 additions and 1 deletions
  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 = {
     /**