From d6525087c7dcd8e7b8302a947420deb0247bb92d Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 23 Sep 2016 17:53:24 +0200 Subject: [PATCH] jshint compliancy --- www/common/cryptpad-common.js | 3 +-- www/common/toolbar.js | 2 +- www/pad/main.js | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 3185f462c..8aa391496 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -201,8 +201,7 @@ define([ } else if (mode === 'view') { secret.channel = base64ToHex(hashArray[3]); - var keys = Crypto.createViewCryptor(hashArray[4].replace(/-/g, '/')); - secret.keys = keys; + secret.keys = Crypto.createViewCryptor(hashArray[4].replace(/-/g, '/')); if (secret.channel.length !== 32) { common.alert("The channel key is invalid"); throw new Error("The channel key is invalid"); diff --git a/www/common/toolbar.js b/www/common/toolbar.js index b2be2f5ca..089195950 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -148,7 +148,7 @@ define([ if (!n || !parseInt(n) || n === 0) { return ''; } if (n === 1) { return '; + ' + Messages.oneViewer; } return '; + ' + Messages._getKey('viewers', [n]); - } + }; var updateUserList = function (myUserName, listElement, userList, userData, readOnly) { var meIdx = userList.indexOf(myUserName); if (meIdx === -1) { diff --git a/www/pad/main.js b/www/pad/main.js index 74c9e722e..b9ebd657a 100644 --- a/www/pad/main.js +++ b/www/pad/main.js @@ -275,7 +275,7 @@ define([ }; var setName = module.setName = function (newName) { - if (!(typeof(newName) === 'string')) { return; } + if (typeof(newName) !== 'string') { return; } var myUserNameTemp = Cryptpad.fixHTML(newName.trim()); if(myUserNameTemp.length > 32) { myUserNameTemp = myUserNameTemp.substr(0, 32); @@ -673,7 +673,7 @@ define([ if (typeof(lastName) === 'string' && lastName.length) { setName(lastName); } - onLocal(); + realtimeOptions.onLocal(); }); };