From 7f608b6002a1305f8e31760702d7a3b7a78a4bd5 Mon Sep 17 00:00:00 2001 From: brantje Date: Tue, 21 Feb 2017 18:02:13 +0100 Subject: [PATCH] Code style fixes --- js/background/service/background.js | 4 ++-- js/lib/api.js | 2 +- js/lib/jQuerytoObject.js | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/js/background/service/background.js b/js/background/service/background.js index fa7d3b0..e810350 100644 --- a/js/background/service/background.js +++ b/js/background/service/background.js @@ -348,7 +348,7 @@ color: defaultColor, tabId: tab.id }); - var plural = (credentialAmount == 1) ? 'credential' : 'credentials'; + var plural = (credentialAmount === 1) ? 'credential' : 'credentials'; API.browserAction.setTitle({ title: 'Passman - ' + credentialAmount.toString() + ' '+ plural +' found for this page', tabId: tab.id @@ -383,7 +383,7 @@ var tab = tabs[t]; createIconForTab(tab); } - }) + }); } diff --git a/js/lib/api.js b/js/lib/api.js index d57f2f0..4612b2b 100644 --- a/js/lib/api.js +++ b/js/lib/api.js @@ -138,7 +138,7 @@ window.PAPI = (function () { var request = new Request(_API.host + '/index.php/apps/passman' + endpoint, opts); fetch(request).then(function(response){ - if(response.status != 200){ + if(response.status !== 200){ callback({error: true, result: {statusText: response.statusText, status: response.status}}); return; } diff --git a/js/lib/jQuerytoObject.js b/js/lib/jQuerytoObject.js index cda796e..a388e23 100644 --- a/js/lib/jQuerytoObject.js +++ b/js/lib/jQuerytoObject.js @@ -7,12 +7,12 @@ jQuery.fn.serializeObject = function() if (!o[this.name].push) { o[this.name] = [o[this.name]]; } - var value = (this.value == 'on') ? true : this.value; + var value = (this.value === 'on') ? true : this.value; value = (value === 'off') ? false : value; o[this.name].push(value || ''); } else { - var value = (this.value == 'on') ? true : this.value; - value = (value == 'off') ? false : value; + var value = (this.value === 'on') ? true : this.value; + value = (value === 'off') ? false : value; o[this.name] = value; } });