Browse Source

fix: expand user-agent check for mobile devices

huangyan321 1 năm trước cách đây
mục cha
commit
80b9b01a16
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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 = {
     /**