diff --git a/chromeKeePassXC/background/event.js b/chromeKeePassXC/background/event.js index 3cf623d..91fa8fd 100644 --- a/chromeKeePassXC/background/event.js +++ b/chromeKeePassXC/background/event.js @@ -128,6 +128,7 @@ event.onGetStatus = function(callback, tab) { browserAction.showDefault(null, tab); console.log(page.tabs[tab.id].errorMessage); + console.log("Configured: " + configured + " Key id: " + keyId + " closed: " + keepass.isDatabaseClosed + " avail: " + keepass.isKeePassXCAvailable + " unreg: " + keepass.isEncryptionKeyUnrecognized + " isass: " + keepass.isAssociated()); callback({ identifier: keyId, configured: configured, diff --git a/chromeKeePassXC/background/init.js b/chromeKeePassXC/background/init.js index 95b4a1b..79dade4 100644 --- a/chromeKeePassXC/background/init.js +++ b/chromeKeePassXC/background/init.js @@ -33,9 +33,9 @@ var _interval = 250; * @param {object} tab */ browser.tabs.onCreated.addListener(function(tab) { - if(tab.id > 0) { + if (tab.id > 0) { //console.log("browser.tabs.onCreated(" + tab.id+ ")"); - if(tab.selected) { + if (tab.selected) { page.currentTabId = tab.id; event.invoke(page.switchTab, null, tab.id, []); } @@ -49,7 +49,7 @@ browser.tabs.onCreated.addListener(function(tab) { */ browser.tabs.onRemoved.addListener(function(tabId, removeInfo) { delete page.tabs[tabId]; - if(page.currentTabId == tabId) { + if (page.currentTabId == tabId) { page.currentTabId = -1; } }); @@ -66,9 +66,9 @@ browser.tabs.onActivated.addListener(function(activeInfo) { browser.tabs.get(activeInfo.tabId, function(info) { //console.log(info.id + ": " + info.url); - if(info && info.id) { + if (info && info.id) { page.currentTabId = info.id; - if(info.status == "complete") { + if (info.status == "complete") { //console.log("event.invoke(page.switchTab, null, "+info.id + ", []);"); event.invoke(page.switchTab, null, info.id, []); } @@ -82,7 +82,7 @@ browser.tabs.onActivated.addListener(function(activeInfo) { * @param {object} changeInfo */ browser.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { - if(changeInfo.status == "complete") { + if (changeInfo.status == "complete") { event.invoke(browserAction.removeRememberPopup, null, tabId, []); } }); diff --git a/chromeKeePassXC/background/keepass.js b/chromeKeePassXC/background/keepass.js index 5465230..836167a 100644 --- a/chromeKeePassXC/background/keepass.js +++ b/chromeKeePassXC/background/keepass.js @@ -15,7 +15,7 @@ keepass.nativePort = null; keepass.keySize = 24; keepass.latestVersionUrl = "https://raw.githubusercontent.com/keepassxreboot/keepassxc/develop/CHANGELOG"; keepass.cacheTimeout = 30 * 1000; // milliseconds -keepass.databaseHash = "no-hash"; //no-hash = keepasshttp is too old and does not return a hash value +keepass.databaseHash = "no-hash"; //no-hash = KeePassXC is too old and does not return a hash value keepass.keyRing = (typeof(localStorage.keyRing) == 'undefined') ? {} : JSON.parse(localStorage.keyRing); keepass.keyId = "chromekeepassxc-cryptokey-name"; keepass.keyBody = "chromekeepassxc-key"; @@ -237,8 +237,6 @@ keepass.generatePassword = function (callback, tab, forceCallback) { keepass.setcurrentKeePassXCVersion(parsed.version); if (keepass.verifyResponse(parsed, response.nonce)) { var rIv = response.nonce; - - // var response = JSON.stringify({ Login: (msg.password.length * 8), Password: msg.password }); if (parsed.entries) { passwords = parsed.entries; keepass.updateLastUsed(keepass.databaseHash); diff --git a/chromeKeePassXC/popups/popup.js b/chromeKeePassXC/popups/popup.js index 0422901..c1063f4 100644 --- a/chromeKeePassXC/popups/popup.js +++ b/chromeKeePassXC/popups/popup.js @@ -5,6 +5,7 @@ window.browser = (function () { })(); function status_response(r) { + console.log(r); $('#initial-state').hide(); $('#error-encountered').hide(); $('#need-reconfigure').hide(); @@ -27,7 +28,7 @@ function status_response(r) { $('#need-reconfigure').show(); $('#need-reconfigure-message').html(r.error); } - else if(typeof(r.error) != "undefined" || r.error != null) { + else if (r.error != null) { $('#error-encountered').show(); $('#error-message').html(r.error); }