Added is.js library

This commit is contained in:
RainLoop Team 2015-02-17 21:44:11 +04:00
parent 2616b911e1
commit 2038acc14a
10 changed files with 3220 additions and 68 deletions

View file

@ -7,6 +7,7 @@
Globals = {},
window = require('window'),
is = require('is'),
_ = require('_'),
$ = require('$'),
ko = require('ko'),
@ -68,24 +69,14 @@
Globals.bUnload = false;
/**
* @type {string}
* @type {boolean}
*/
Globals.sUserAgent = (window.navigator.userAgent || '').toLowerCase();
Globals.bTabletDevice = is.tablet();
/**
* @type {boolean}
*/
Globals.bIsiOSDevice = -1 < Globals.sUserAgent.indexOf('iphone') || -1 < Globals.sUserAgent.indexOf('ipod') || -1 < Globals.sUserAgent.indexOf('ipad');
/**
* @type {boolean}
*/
Globals.bIsAndroidDevice = -1 < Globals.sUserAgent.indexOf('android');
/**
* @type {boolean}
*/
Globals.bMobileDevice = Globals.bIsiOSDevice || Globals.bIsAndroidDevice;
Globals.bMobileDevice = is.mobile() || is.tablet();
/**
* @type {boolean}