123456789101112131415161718192021222324 |
- export function isAndroid() {
- var ua = navigator.userAgent,
- _isAndroid = ua.indexOf('Android') > -1 || ua.indexOf('Linux') > -1;
- return _isAndroid;
- }
- export function isIOS() {
- return !!navigator.userAgent.match(/(i[^;]+\;(U;)? CPU.+Mac OS X)/);
- }
- export function isPad() {
- return navigator.userAgent.toLowerCase().match(/iPad/i) == "ipad";
- }
- export function isWinPad() {
- return navigator.userAgent.indexOf("Windows NT") >= 0;
- }
- export default {
- isAndroid,
- isIOS,
- isPad,
- isWinPad
- }
|