diff --git a/CHANGELOG b/CHANGELOG index f8707dd..6b8b184 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ 0.2.7 (2017-??-??) ========================= - Some Firefox related changes (credits to projectgus) +- Fixed Skip button function when choosing own credential fields 0.2.6 (2017-07-23) ========================= diff --git a/README.md b/README.md index bf98488..a535e47 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,6 @@ For testing purposes, please use following unofficial KeePassXC [release's](http Get the extension for [Firefox](https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser/) or [Chrome/Chromium](https://chrome.google.com/webstore/detail/keepassxc-browser/iopaggbpplllidnfmcghoonnokmjoicf). -If you want to use the extension manually with the latest stable build of Firefox, you can do the following: -- Install [Firefox Nightly](https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly) -- Download the .crx file from [releases](https://github.com/varjolintu/keepassxc-browser/releases) -- Drag the .crx to the Firefox's Add-ons page (about:addons) -- Close Firefox Nightly and start the stable Firefox. The add-on should be now installed - ## How it works There are two methods which you can use keepassxc-browser to connect to KeePassXC: diff --git a/keepassxc-browser/background/keepass.js b/keepassxc-browser/background/keepass.js index d87438c..2d11a80 100644 --- a/keepassxc-browser/background/keepass.js +++ b/keepassxc-browser/background/keepass.js @@ -611,16 +611,14 @@ keepass.keePassXCUpdateAvailable = function() { keepass.checkForNewKeePassXCVersion = function() { let xhr = new XMLHttpRequest(); let version = -1; - xhr.open('GET', keepass.latestVersionUrl, true); + xhr.onload = function(e) { - if (xhr.readyState === 4) { - if (xhr.status === 200) { - const json = JSON.parse(xhr.responseText); - if (json.tag_name) { - version = json.tag_name; - keepass.latestKeePassXC.version = version; - keepass.latestKeePassXC.versionParsed = Number(version.replace(/\./g, '')); - } + if (xhr.readyState === 4 && xhr.status === 200) { + const json = JSON.parse(xhr.responseText); + if (json.tag_name) { + version = json.tag_name; + keepass.latestKeePassXC.version = version; + keepass.latestKeePassXC.versionParsed = Number(version.replace(/\./g, '')); } } @@ -633,7 +631,13 @@ keepass.checkForNewKeePassXCVersion = function() { console.log('checkForNewKeePassXCVersion error:' + e); } - xhr.send(); + try { + xhr.open('GET', keepass.latestVersionUrl, true); + xhr.send(); + } + catch (ex) { + console.log(ex); + } keepass.latestKeePassXC.lastChecked = new Date(); } diff --git a/keepassxc-browser/keepassxc-browser.js b/keepassxc-browser/keepassxc-browser.js index a2ff9d4..279913e 100644 --- a/keepassxc-browser/keepassxc-browser.js +++ b/keepassxc-browser/keepassxc-browser.js @@ -562,12 +562,12 @@ cipDefine.initDescription = function() { .addClass('btn').addClass('btn-info') .css('margin-right', '5px') .click(function() { - if (jQuery(this).data('step') === 1) { + if (jQuery(this).data('step') === '1') { cipDefine.selection.username = null; cipDefine.prepareStep2(); cipDefine.markAllPasswordFields(jQuery('#b2c-cipDefine-fields')); } - else if (jQuery(this).data('step') === 2) { + else if (jQuery(this).data('step') === '2') { cipDefine.selection.password = null; cipDefine.prepareStep3(); cipDefine.markAllStringFields(jQuery('#b2c-cipDefine-fields')); diff --git a/keepassxc-browser/manifest.json b/keepassxc-browser/manifest.json index 97404e4..28b7e0d 100644 --- a/keepassxc-browser/manifest.json +++ b/keepassxc-browser/manifest.json @@ -36,9 +36,19 @@ }, "content_scripts": [ { - "matches": [ "http://*/*", "https://*/*" ], - "js": [ "jquery-3.2.1.min.js", "jquery-ui.min.js", "keepassxc-browser.js" ], - "css": [ "jquery-ui.min.css", "keepassxc-browser.css" ], + "matches": [ + "http://*/*", + "https://*/*" + ], + "js": [ + "jquery-3.2.1.min.js", + "jquery-ui.min.js", + "keepassxc-browser.js" + ], + "css": [ + "jquery-ui.min.css", + "keepassxc-browser.css" + ], "run_at": "document_idle", "all_frames": true } diff --git a/keepassxc-browser/popups/popup.js b/keepassxc-browser/popups/popup.js index 0f9d83c..779baf5 100644 --- a/keepassxc-browser/popups/popup.js +++ b/keepassxc-browser/popups/popup.js @@ -55,7 +55,7 @@ $(function() { }); $('#redetect-fields-button').click(function() { - browser.tabs.query({'active': true, 'windowId': browser.windows.WINDOW_ID_CURRENT}, (tabs) => { + browser.tabs.query({"active": true, "currentWindow": true}, (tabs) => { if (tabs.length === 0) return; // For example: only the background devtools or a popup are opened let tab = tabs[0];