jshint compliancy

This commit is contained in:
ansuz 2016-09-23 17:53:24 +02:00
parent ed9acf1c00
commit d6525087c7
3 changed files with 4 additions and 5 deletions

View File

@ -201,8 +201,7 @@ define([
} }
else if (mode === 'view') { else if (mode === 'view') {
secret.channel = base64ToHex(hashArray[3]); secret.channel = base64ToHex(hashArray[3]);
var keys = Crypto.createViewCryptor(hashArray[4].replace(/-/g, '/')); secret.keys = Crypto.createViewCryptor(hashArray[4].replace(/-/g, '/'));
secret.keys = keys;
if (secret.channel.length !== 32) { if (secret.channel.length !== 32) {
common.alert("The channel key is invalid"); common.alert("The channel key is invalid");
throw new Error("The channel key is invalid"); throw new Error("The channel key is invalid");

View File

@ -148,7 +148,7 @@ define([
if (!n || !parseInt(n) || n === 0) { return ''; } if (!n || !parseInt(n) || n === 0) { return ''; }
if (n === 1) { return '; + ' + Messages.oneViewer; } if (n === 1) { return '; + ' + Messages.oneViewer; }
return '; + ' + Messages._getKey('viewers', [n]); return '; + ' + Messages._getKey('viewers', [n]);
} };
var updateUserList = function (myUserName, listElement, userList, userData, readOnly) { var updateUserList = function (myUserName, listElement, userList, userData, readOnly) {
var meIdx = userList.indexOf(myUserName); var meIdx = userList.indexOf(myUserName);
if (meIdx === -1) { if (meIdx === -1) {

View File

@ -275,7 +275,7 @@ define([
}; };
var setName = module.setName = function (newName) { var setName = module.setName = function (newName) {
if (!(typeof(newName) === 'string')) { return; } if (typeof(newName) !== 'string') { return; }
var myUserNameTemp = Cryptpad.fixHTML(newName.trim()); var myUserNameTemp = Cryptpad.fixHTML(newName.trim());
if(myUserNameTemp.length > 32) { if(myUserNameTemp.length > 32) {
myUserNameTemp = myUserNameTemp.substr(0, 32); myUserNameTemp = myUserNameTemp.substr(0, 32);
@ -673,7 +673,7 @@ define([
if (typeof(lastName) === 'string' && lastName.length) { if (typeof(lastName) === 'string' && lastName.length) {
setName(lastName); setName(lastName);
} }
onLocal(); realtimeOptions.onLocal();
}); });
}; };