Micooz 8 лет назад
Родитель
Сommit
339baea876
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      src/utils.js

+ 6 - 0
src/utils.js

@@ -35,4 +35,10 @@ module.exports = {
         }
         return actualLeft - elementScrollLeft;
     },
+
+    /**
+     * check if user is using mobile or not
+     */
+    isMobile: /mobile/i.test(window.navigator.userAgent)
+
 };