mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 06:30:38 +00:00
Lint fixes
This commit is contained in:
parent
9b10bdc0be
commit
7d1ca6815f
4 changed files with 13 additions and 13 deletions
|
@ -294,7 +294,7 @@ var DataManager = new Class({
|
||||||
* @param {*} [data] - The value to increase for the given key.
|
* @param {*} [data] - The value to increase for the given key.
|
||||||
*
|
*
|
||||||
* @return {Phaser.Data.DataManager} This DataManager object.
|
* @return {Phaser.Data.DataManager} This DataManager object.
|
||||||
*/
|
*/
|
||||||
inc: function (key, data)
|
inc: function (key, data)
|
||||||
{
|
{
|
||||||
if (this._frozen)
|
if (this._frozen)
|
||||||
|
@ -332,7 +332,7 @@ var DataManager = new Class({
|
||||||
* @param {(string|object)} key - The key to toggle the value for.
|
* @param {(string|object)} key - The key to toggle the value for.
|
||||||
*
|
*
|
||||||
* @return {Phaser.Data.DataManager} This DataManager object.
|
* @return {Phaser.Data.DataManager} This DataManager object.
|
||||||
*/
|
*/
|
||||||
toggle: function (key)
|
toggle: function (key)
|
||||||
{
|
{
|
||||||
if (this._frozen)
|
if (this._frozen)
|
||||||
|
|
|
@ -53,7 +53,7 @@ function init ()
|
||||||
{
|
{
|
||||||
var ua = navigator.userAgent;
|
var ua = navigator.userAgent;
|
||||||
|
|
||||||
if (/Edge\/\d+/.test(ua))
|
if ((/Edge\/\d+/).test(ua))
|
||||||
{
|
{
|
||||||
Browser.edge = true;
|
Browser.edge = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,23 +63,23 @@ function init ()
|
||||||
{
|
{
|
||||||
var ua = navigator.userAgent;
|
var ua = navigator.userAgent;
|
||||||
|
|
||||||
if (/Windows/.test(ua))
|
if ((/Windows/).test(ua))
|
||||||
{
|
{
|
||||||
OS.windows = true;
|
OS.windows = true;
|
||||||
}
|
}
|
||||||
else if (/Mac OS/.test(ua) && !(/like Mac OS/.test(ua)))
|
else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))
|
||||||
{
|
{
|
||||||
OS.macOS = true;
|
OS.macOS = true;
|
||||||
}
|
}
|
||||||
else if (/Android/.test(ua))
|
else if ((/Android/).test(ua))
|
||||||
{
|
{
|
||||||
OS.android = true;
|
OS.android = true;
|
||||||
}
|
}
|
||||||
else if (/Linux/.test(ua))
|
else if ((/Linux/).test(ua))
|
||||||
{
|
{
|
||||||
OS.linux = true;
|
OS.linux = true;
|
||||||
}
|
}
|
||||||
else if (/iP[ao]d|iPhone/i.test(ua))
|
else if ((/iP[ao]d|iPhone/i).test(ua))
|
||||||
{
|
{
|
||||||
OS.iOS = true;
|
OS.iOS = true;
|
||||||
|
|
||||||
|
@ -90,19 +90,19 @@ function init ()
|
||||||
OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;
|
OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;
|
||||||
OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;
|
OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;
|
||||||
}
|
}
|
||||||
else if (/Kindle/.test(ua) || (/\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))
|
else if ((/Kindle/).test(ua) || (/\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))
|
||||||
{
|
{
|
||||||
OS.kindle = true;
|
OS.kindle = true;
|
||||||
|
|
||||||
// This will NOT detect early generations of Kindle Fire, I think there is no reliable way...
|
// This will NOT detect early generations of Kindle Fire, I think there is no reliable way...
|
||||||
// E.g. "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true"
|
// E.g. "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true"
|
||||||
}
|
}
|
||||||
else if (/CrOS/.test(ua))
|
else if ((/CrOS/).test(ua))
|
||||||
{
|
{
|
||||||
OS.chromeOS = true;
|
OS.chromeOS = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/Windows Phone/i.test(ua) || (/IEMobile/i).test(ua))
|
if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))
|
||||||
{
|
{
|
||||||
OS.android = false;
|
OS.android = false;
|
||||||
OS.iOS = false;
|
OS.iOS = false;
|
||||||
|
@ -119,7 +119,7 @@ function init ()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Windows Phone / Table reset
|
// Windows Phone / Table reset
|
||||||
if (OS.windowsPhone || ((/Windows NT/i.test(ua)) && (/Touch/i.test(ua))))
|
if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))
|
||||||
{
|
{
|
||||||
OS.desktop = false;
|
OS.desktop = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -355,7 +355,7 @@ var Tween = new Class({
|
||||||
* @param {integer} [index=0] - The Tween Data to return the value from.
|
* @param {integer} [index=0] - The Tween Data to return the value from.
|
||||||
*
|
*
|
||||||
* @return {number} The value of the requested Tween Data.
|
* @return {number} The value of the requested Tween Data.
|
||||||
*/
|
*/
|
||||||
getValue: function (index)
|
getValue: function (index)
|
||||||
{
|
{
|
||||||
if (index === undefined) { index = 0; }
|
if (index === undefined) { index = 0; }
|
||||||
|
|
Loading…
Reference in a new issue