diff --git a/src/popup/app/accounts/accountsLoginTwoFactorController.js b/src/popup/app/accounts/accountsLoginTwoFactorController.js index 54b8f90ea8..34e72bfb97 100644 --- a/src/popup/app/accounts/accountsLoginTwoFactorController.js +++ b/src/popup/app/accounts/accountsLoginTwoFactorController.js @@ -55,7 +55,7 @@ } else if ($scope.providerType === constants.twoFactorProvider.email || $scope.providerType === constants.twoFactorProvider.authenticator) { - token = token.replace(' ', '') + token = token.replace(' ', ''); } $scope.loginPromise = authService.logIn(email, masterPassword, $scope.providerType, token, $scope.remember.checked); @@ -122,7 +122,7 @@ providerPriority = provider[0].priority; } } - return providerType == null ? null : parseInt(providerType); + return providerType === null ? null : parseInt(providerType); } function init() { @@ -131,8 +131,9 @@ $timeout(function () { $('#code').focus(); + var params; if ($scope.providerType === constants.twoFactorProvider.duo) { - var params = providers[constants.twoFactorProvider.duo]; + params = providers[constants.twoFactorProvider.duo]; $window.Duo.init({ host: params.Host, @@ -144,7 +145,7 @@ }); } else if ($scope.providerType === constants.twoFactorProvider.u2f) { - var params = providers[constants.twoFactorProvider.u2f]; + params = providers[constants.twoFactorProvider.u2f]; var challenges = JSON.parse(params.Challenges); u2f.init({ @@ -157,7 +158,7 @@ }); } else if ($scope.providerType === constants.twoFactorProvider.email) { - var params = providers[constants.twoFactorProvider.email]; + params = providers[constants.twoFactorProvider.email]; $scope.twoFactorEmail = params.Email; if (chrome.extension.getViews({ type: 'popup' }).length > 0) { diff --git a/src/popup/app/vault/vaultViewLoginController.js b/src/popup/app/vault/vaultViewLoginController.js index 01c877b4c9..4ea4bdbfdb 100644 --- a/src/popup/app/vault/vaultViewLoginController.js +++ b/src/popup/app/vault/vaultViewLoginController.js @@ -172,7 +172,7 @@ angular } }); }); - }; + } function totpTick() { $timeout(function () { @@ -183,9 +183,9 @@ angular $scope.totpSec = sec; $scope.totpDash = (2.62 * mod).toFixed(2); $scope.totpLow = sec <= 7; - if (mod == 0) { + if (mod === 0) { totpUpdateCode(); } }); - }; + } }); diff --git a/src/services/totpService.js b/src/services/totpService.js index b01321aefd..687383381c 100644 --- a/src/services/totpService.js +++ b/src/services/totpService.js @@ -26,7 +26,7 @@ function initTotpService() { bytes[i / 2] = parseInt(s.substr(i, 2), 16); } return bytes; - } + }; var buff2hex = function (buff) { var bytes = new Uint8Array(buff); @@ -36,7 +36,7 @@ function initTotpService() { hex.push((bytes[i] & 0xF).toString(16)); } return hex.join(''); - } + }; var b32tohex = function (s) { s = s.toUpperCase();