lint fixes

This commit is contained in:
Kyle Spearrin 2017-10-06 10:36:45 -04:00
parent 7394cec986
commit 79f20f09cb
8 changed files with 20 additions and 17 deletions

View File

@ -631,6 +631,8 @@ var bg_isBackground = true,
var tabDomain = bg_utilsService.getDomain(tab.url);
if (tabDomain && tabDomain === loginToAdd.domain) {
bg_loginsToAdd.splice(i, 1);
/* jshint ignore:start */
bg_loginService.encrypt({
id: null,
folderId: null,
@ -649,6 +651,8 @@ var bg_isBackground = true,
});
});
});
/* jshint ignore:end */
messageTab(tab.id, 'closeNotificationBar');
}
}
@ -671,11 +675,8 @@ var bg_isBackground = true,
}
}
function checkbg_loginsToAdd(tab, callback) {
function checkbg_loginsToAdd(tab) {
if (!bg_loginsToAdd.length) {
if (callback) {
callback();
}
return;
}
@ -693,17 +694,11 @@ var bg_isBackground = true,
function check() {
if (!tab) {
if (callback) {
callback();
}
return;
}
var tabDomain = bg_utilsService.getDomain(tab.url);
if (!tabDomain) {
if (callback) {
callback();
}
return;
}
@ -711,11 +706,7 @@ var bg_isBackground = true,
if (bg_loginsToAdd[i].tabId === tab.id && bg_loginsToAdd[i].domain === tabDomain) {
messageTab(tab.id, 'openNotificationBar', {
type: 'add'
}, function () {
if (callback) {
callback();
}
});
}, function () { });
break;
}
}

View File

@ -41,7 +41,7 @@
if (paramIndex > -1) {
pagePath = pagePath.substring(0, paramIndex);
}
return encodeURIComponent(pagePath)
return encodeURIComponent(pagePath);
}
bgPage.bg_appIdService.getAnonymousAppId(function (gaAnonAppId) {

View File

@ -11,7 +11,9 @@
var thisU2f = null;
U2f.prototype.init = function (data) {
/* jshint ignore:start */
var self = thisU2f = this;
/* jshint ignore:end */
self.connectorLink.href = self.webVaultUrl + '/u2f-connector.html' +
'?data=' + this.base64Encode(JSON.stringify(data)) +

View File

@ -240,13 +240,17 @@ function initAutofill() {
totpPromise = self.totpService.isAutoCopyEnabled().then(function (enabled) {
if (enabled) {
/* jshint ignore:start */
return self.totpService.getCode(login.totp);
/* jshint ignore:end */
}
return null;
}).then(function (code) {
if (code) {
/* jshint ignore:start */
self.utilsService.copyToClipboard(code);
/* jshint ignore:end */
}
return code;

View File

@ -220,6 +220,7 @@ function initCryptoService(constantsService) {
var decPromises = [];
for (var orgId in obj.encOrgKeys) {
if (obj.encOrgKeys.hasOwnProperty(orgId)) {
/* jshint ignore:start */
(function (orgIdInstance) {
var promise = self.rsaDecrypt(obj.encOrgKeys[orgIdInstance]).then(function (decValueB64) {
orgKeys[orgIdInstance] = new SymmetricCryptoKey(decValueB64, true);
@ -229,6 +230,7 @@ function initCryptoService(constantsService) {
});
decPromises.push(promise);
})(orgId);
/* jshint ignore:end */
}
}

View File

@ -87,9 +87,11 @@ function initFolderService() {
}];
self.getAll(function (folders) {
for (var i = 0; i < folders.length; i++) {
/* jshint ignore:start */
promises.push(folders[i].decrypt().then(function (folder) {
decFolders.push(folder);
}));
/* jshint ignore:end */
}
Q.all(promises).then(function () {

View File

@ -144,5 +144,5 @@ function initLockService(self) {
}
return null;
};
}
}

View File

@ -172,9 +172,11 @@ function initLoginService() {
var decLogins = [];
self.getAll(function (logins) {
for (var i = 0; i < logins.length; i++) {
/* jshint ignore:start */
promises.push(logins[i].decrypt().then(function (login) {
decLogins.push(login);
}));
/* jshint ignore:end */
}
Q.all(promises).then(function () {