mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 14:47:12 -04:00
handler/TimesliderMessageHandler: use jshint
This commit is contained in:
parent
e7b2a2b3b9
commit
11568b1278
1 changed files with 68 additions and 68 deletions
|
@ -39,7 +39,7 @@ var socketio;
|
|||
exports.setSocketIO = function(socket_io)
|
||||
{
|
||||
socketio=socket_io;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles the connection of a new user
|
||||
|
@ -48,7 +48,7 @@ exports.setSocketIO = function(socket_io)
|
|||
exports.handleConnect = function(client)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles the disconnection of a user
|
||||
|
@ -57,7 +57,7 @@ exports.handleConnect = function(client)
|
|||
exports.handleDisconnect = function(client)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles a message from a user
|
||||
|
@ -80,11 +80,11 @@ exports.handleMessage = function(client, message)
|
|||
{
|
||||
messageLogger.warn("Dropped message, unknown Message Type: '" + message.type + "'");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function handleClientReady(client, message)
|
||||
{
|
||||
if(message.padId == null)
|
||||
if(!message.padId)
|
||||
{
|
||||
messageLogger.warn("Dropped message, changeset request has no padId!");
|
||||
return;
|
||||
|
@ -96,7 +96,7 @@ function handleClientReady(client, message)
|
|||
ERR(err);
|
||||
|
||||
client.json.send({type: "CLIENT_VARS", data: clientVars});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -105,27 +105,27 @@ function handleClientReady(client, message)
|
|||
function handleChangesetRequest(client, message)
|
||||
{
|
||||
//check if all ok
|
||||
if(message.data == null)
|
||||
if(!message.data)
|
||||
{
|
||||
messageLogger.warn("Dropped message, changeset request has no data!");
|
||||
return;
|
||||
}
|
||||
if(message.padId == null)
|
||||
if(!message.padId)
|
||||
{
|
||||
messageLogger.warn("Dropped message, changeset request has no padId!");
|
||||
return;
|
||||
}
|
||||
if(message.data.granularity == null)
|
||||
if(!message.data.granularity)
|
||||
{
|
||||
messageLogger.warn("Dropped message, changeset request has no granularity!");
|
||||
return;
|
||||
}
|
||||
if(message.data.start == null)
|
||||
if(!message.data.start)
|
||||
{
|
||||
messageLogger.warn("Dropped message, changeset request has no start!");
|
||||
return;
|
||||
}
|
||||
if(message.data.requestID == null)
|
||||
if(!message.data.requestID)
|
||||
{
|
||||
messageLogger.warn("Dropped message, changeset request has no requestID!");
|
||||
return;
|
||||
|
@ -301,7 +301,7 @@ function getChangesetInfo(padId, startNum, endNum, granularity, callback)
|
|||
compositesChangesetNeeded.push({start: compositeStart, end: compositeEnd});
|
||||
|
||||
//add the t1 time we need
|
||||
revTimesNeeded.push(compositeStart == 0 ? 0 : compositeStart - 1);
|
||||
revTimesNeeded.push(compositeStart === 0 ? 0 : compositeStart - 1);
|
||||
//add the t2 time we need
|
||||
revTimesNeeded.push(compositeEnd - 1);
|
||||
|
||||
|
@ -372,7 +372,7 @@ function getChangesetInfo(padId, startNum, endNum, granularity, callback)
|
|||
var backwards2 = Changeset.moveOpsToNewPool(backwards, pad.apool(), apool);
|
||||
|
||||
var t1, t2;
|
||||
if (compositeStart == 0)
|
||||
if (compositeStart === 0)
|
||||
{
|
||||
t1 = revisionDate[0];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue