-
-
Save theStrangeAdventurer/f7ef076571f83479b9ec9f1d514e9311 to your computer and use it in GitHub Desktop.
Проверка мобильности устройств на js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isMobile = /iPhone|iPad|iPod|Android|BlackBerry|BB10|Silk|Mobi/i.test(self._navigator && self._navigator.userAgent); | |
var isTouch = !!(('ontouchend' in window) || (self._navigator && self._navigator.maxTouchPoints > 0) || (self._navigator && self._navigator.msMaxTouchPoints > 0)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment