From 9f030df327e7f62045f73d97814c458b33eab95b Mon Sep 17 00:00:00 2001 From: varjolintu Date: Sat, 29 Jul 2017 10:26:16 +0300 Subject: [PATCH 1/4] Some minor changes, mostly related to Firefox --- CHANGELOG | 4 +++ README.md | 7 +++++ ...rjolintu.keepassxc-browser-chrome-win.json | 3 +- com.varjolintu.keepassxc-browser-chrome.json | 3 +- keepassxc-browser/background/event.js | 6 ---- keepassxc-browser/background/init.js | 12 ++++--- keepassxc-browser/background/keepass.js | 26 +--------------- keepassxc-browser/keepassxc-browser.js | 31 +++++++++++++------ keepassxc-browser/manifest.json | 4 +-- keepassxc-browser/options/options.js | 2 +- keepassxc-browser/popups/popup_httpauth.js | 3 +- keepassxc-browser/popups/popup_login.js | 2 +- 12 files changed, 51 insertions(+), 52 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 726d92c..f8707dd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +0.2.7 (2017-??-??) +========================= +- Some Firefox related changes (credits to projectgus) + 0.2.6 (2017-07-23) ========================= - Fixed error message variables diff --git a/README.md b/README.md index 05dd478..bf98488 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,17 @@ Chrome extension for [KeePassXC](https://keepassxc.org/) with Native Messaging. This is a heavily forked version of [pfn](https://github.com/pfn)'s [chromeIPass](https://github.com/pfn/passifox). +Some changes merged also from [projectgus'](https://github.com/projectgus/passifox) fork. For testing purposes, please use following unofficial KeePassXC [release's](https://github.com/varjolintu/keepassxc/releases). 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/com.varjolintu.keepassxc-browser-chrome-win.json b/com.varjolintu.keepassxc-browser-chrome-win.json index 608265f..acf8450 100644 --- a/com.varjolintu.keepassxc-browser-chrome-win.json +++ b/com.varjolintu.keepassxc-browser-chrome-win.json @@ -5,6 +5,7 @@ "type": "stdio", "allowed_origins": [ "chrome-extension://iopaggbpplllidnfmcghoonnokmjoicf/", - "chrome-extension://fhakpkpdnjecjfceboihdjpfmgajebii/" + "chrome-extension://fhakpkpdnjecjfceboihdjpfmgajebii/", + "chrome-extension://jaikbblhommnkeialomogohhdlndpfbi/" ] } \ No newline at end of file diff --git a/com.varjolintu.keepassxc-browser-chrome.json b/com.varjolintu.keepassxc-browser-chrome.json index 9266fe9..0fb2adb 100644 --- a/com.varjolintu.keepassxc-browser-chrome.json +++ b/com.varjolintu.keepassxc-browser-chrome.json @@ -5,6 +5,7 @@ "type": "stdio", "allowed_origins": [ "chrome-extension://iopaggbpplllidnfmcghoonnokmjoicf/", - "chrome-extension://fhakpkpdnjecjfceboihdjpfmgajebii/" + "chrome-extension://fhakpkpdnjecjfceboihdjpfmgajebii/", + "chrome-extension://jaikbblhommnkeialomogohhdlndpfbi/" ] } \ No newline at end of file diff --git a/keepassxc-browser/background/event.js b/keepassxc-browser/background/event.js index 4e4d208..e10a89a 100644 --- a/keepassxc-browser/background/event.js +++ b/keepassxc-browser/background/event.js @@ -44,11 +44,6 @@ event.invoke = function(handler, callback, senderTabId, args, secondTime) { page.removePageInformationFromNotExistingTabs(); browser.tabs.get(senderTabId, (tab) => { - //browser.tabs.query({'active': true, 'windowId': browser.windows.WINDOW_ID_CURRENT}, function(tabs) { - //if (tabs.length === 0) - // return; // For example: only the background devtools or a popup are opened - //var tab = tabs[0]; - if (!tab) { return; } @@ -260,6 +255,5 @@ event.messageHandlers = { 'stack_add': browserAction.stackAdd, 'update_available_keepassxc': event.onUpdateAvailableKeePassXC, 'generate_password': keepass.generatePassword, - 'copy_password': keepass.copyPassword, 'reconnect': event.onReconnect }; \ No newline at end of file diff --git a/keepassxc-browser/background/init.js b/keepassxc-browser/background/init.js index 934777b..d9f3cfc 100644 --- a/keepassxc-browser/background/init.js +++ b/keepassxc-browser/background/init.js @@ -10,7 +10,9 @@ keepass.changePublicKeys(null, (pkRes) => { window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); // Set initial tab-ID -browser.tabs.query({'active': true, 'windowId': browser.windows.WINDOW_ID_CURRENT}, (tabs) => { +//browser.tabs.query({'active': true, 'windowId': browser.windows.WINDOW_ID_CURRENT}, (tabs) => { +browser.tabs.query({"active": true, "currentWindow": true}, (tabs) => { +//browser.tabs.query({"active": true, "currentWindow": true}).then((tabs) => { if (tabs.length === 0) return; // For example: only the background devtools or a popup are opened page.currentTabId = tabs[0].id; @@ -80,9 +82,11 @@ browser.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { }); // Retrieve Credentials and try auto-login for HTTPAuth requests -browser.webRequest.onAuthRequired.addListener(httpAuth.handleRequest, - { urls: [''] }, ['asyncBlocking'] -); +if (browser.webRequest.onAuthRequired) { + browser.webRequest.onAuthRequired.addListener(httpAuth.handleRequest, + { urls: [''] }, ['asyncBlocking'] + ); +} browser.runtime.onMessage.addListener(event.onMessage); diff --git a/keepassxc-browser/background/keepass.js b/keepassxc-browser/background/keepass.js index 6eda72b..d87438c 100644 --- a/keepassxc-browser/background/keepass.js +++ b/keepassxc-browser/background/keepass.js @@ -273,30 +273,6 @@ keepass.generatePassword = function (callback, tab, forceCallback) { }, tab); } -keepass.copyPassword = function(callback, tab, password) { - browser.runtime.getBackgroundPage((bg) => { - let c2c = bg.document.getElementById('copy2clipboard'); - if (!c2c) { - let input = document.createElement('input'); - input.type = 'text'; - input.id = 'copy2clipboard'; - bg.document.getElementsByTagName('body')[0].appendChild(input); - c2c = bg.document.getElementById('copy2clipboard'); - } - - c2c.value = password; - c2c.select(); - try { - document.execCommand('copy'); - c2c.value = ''; - callback(true); - } - catch (err) { - console.log('Could not copy password to clipboard: ' + err); - } - }); -} - keepass.associate = function(callback, tab) { if (keepass.isAssociated()) { return; @@ -654,7 +630,7 @@ keepass.checkForNewKeePassXCVersion = function() { }; xhr.onerror = function(e) { - console.log('checkForNewKeePassXCVersion error: ${e}'); + console.log('checkForNewKeePassXCVersion error:' + e); } xhr.send(); diff --git a/keepassxc-browser/keepassxc-browser.js b/keepassxc-browser/keepassxc-browser.js index eb00503..a2ff9d4 100644 --- a/keepassxc-browser/keepassxc-browser.js +++ b/keepassxc-browser/keepassxc-browser.js @@ -271,10 +271,7 @@ cipPassword.createDialog = function() { id: 'cip-genpw-btn-clipboard', click: (e) => { e.preventDefault(); - browser.runtime.sendMessage({ - action: 'copy_password', - args: [jQuery('input#cip-genpw-textfield-password').val()] - }, cipPassword.callbackPasswordCopied); + cipPassword.copyPasswordToClipboard(); } }, 'Fill & copy': @@ -309,11 +306,7 @@ cipPassword.createDialog = function() { } } - // Copy password to clipboard - browser.runtime.sendMessage({ - action: 'copy_password', - args: [$password] - }, cipPassword.callbackPasswordCopied); + cipPassword.copyPasswordToClipboard(); } } } @@ -381,6 +374,26 @@ cipPassword.setIconPosition = function($icon, $field) { .css('left', $field.offset().left + $field.outerWidth() - $icon.data('size') - $icon.data('offset')) } +cipPassword.copyPasswordToClipboard = function(e) { + if (e) { + e.preventDefault(); + } + + const input = jQuery("input#cip-genpw-textfield-password"); + input.select() + try { + const success = document.execCommand('copy'); + if (success) { + jQuery("#cip-genpw-btn-clipboard").addClass("b2c-btn-success"); + } + jQuery("#cip-genpw-dialog").select(); + input.value = ''; + } + catch (err) { + console.log('Could not copy password to clipboard: ' + err); + } +} + cipPassword.callbackPasswordCopied = function(bool) { if (bool) { jQuery('#cip-genpw-btn-clipboard').addClass('btn-success'); diff --git a/keepassxc-browser/manifest.json b/keepassxc-browser/manifest.json index 46815eb..97404e4 100644 --- a/keepassxc-browser/manifest.json +++ b/keepassxc-browser/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "keepassxc-browser", - "version": "0.2.6", + "version": "0.2.7", "description": "KeePassXC integration for modern web browsers", "author": "Sami Vänttinen", "icons": { @@ -74,7 +74,7 @@ "applications": { "gecko": { "id": "keepassxc-browser@sami.vanttinen", - "strict_min_version": "56.0a1" + "strict_min_version": "54.0" } } } diff --git a/keepassxc-browser/options/options.js b/keepassxc-browser/options/options.js index 7b44586..25286df 100644 --- a/keepassxc-browser/options/options.js +++ b/keepassxc-browser/options/options.js @@ -36,7 +36,7 @@ options.saveSetting = function(name) { localStorage.settings = JSON.stringify(options.settings); - chrome.extension.sendMessage({ + browser.runtime.sendMessage({ action: 'load_settings' }); } diff --git a/keepassxc-browser/popups/popup_httpauth.js b/keepassxc-browser/popups/popup_httpauth.js index 445c4bd..aa839bf 100644 --- a/keepassxc-browser/popups/popup_httpauth.js +++ b/keepassxc-browser/popups/popup_httpauth.js @@ -2,8 +2,7 @@ window.browser = (function () { return window.msBrowser || window.browser || win $(function() { browser.runtime.getBackgroundPage(function(global) { - browser.tabs.query(null, (tab) => { - //const data = global.tab_httpauth_list['tab' + tab.id]; + browser.tabs.query({"active": true, "currentWindow": true}, (tab) => { const data = global.page.tabs[tab.id].loginList; let ul = document.getElementById('login-list'); for (let i = 0; i < data.logins.length; i++) { diff --git a/keepassxc-browser/popups/popup_login.js b/keepassxc-browser/popups/popup_login.js index 11b152a..19b6d2d 100644 --- a/keepassxc-browser/popups/popup_login.js +++ b/keepassxc-browser/popups/popup_login.js @@ -2,7 +2,7 @@ window.browser = (function () { return window.msBrowser || window.browser || win $(function() { browser.runtime.getBackgroundPage(function(global) { - browser.tabs.query({'active': true, 'windowId': browser.windows.WINDOW_ID_CURRENT}, function(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 const tab = tabs[0]; From 0144b7e2ddbb239124960a82095925ab5c97a5ad Mon Sep 17 00:00:00 2001 From: varjolintu Date: Sun, 30 Jul 2017 21:23:42 +0300 Subject: [PATCH 2/4] Fixed Skip button function when choosing own credential fields --- CHANGELOG | 1 + README.md | 6 ------ keepassxc-browser/background/keepass.js | 24 ++++++++++++++---------- keepassxc-browser/keepassxc-browser.js | 4 ++-- keepassxc-browser/manifest.json | 16 +++++++++++++--- keepassxc-browser/popups/popup.js | 2 +- 6 files changed, 31 insertions(+), 22 deletions(-) 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]; From bb5c4806b4cadc99979b6a6f99c89a59fb4d3ecc Mon Sep 17 00:00:00 2001 From: varjolintu Date: Mon, 31 Jul 2017 14:15:08 +0300 Subject: [PATCH 3/4] More error message related fixes --- CHANGELOG | 6 +++++- keepassxc-browser/background/browserAction.js | 4 +++- keepassxc-browser/background/event.js | 3 ++- keepassxc-browser/background/init.js | 8 +++----- keepassxc-browser/background/keepass.js | 15 ++++++++++++--- keepassxc-browser/keepassxc-browser.js | 1 - keepassxc-browser/options/options.html | 5 +++-- keepassxc-browser/options/options.js | 8 ++++++++ keepassxc-browser/popups/popup.html | 1 + keepassxc-browser/popups/popup_httpauth.html | 1 + keepassxc-browser/popups/popup_login.html | 1 + .../popups/popup_multiple-fields.html | 1 + keepassxc-browser/popups/popup_remember.html | 1 + 13 files changed, 41 insertions(+), 14 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6b8b184..ff72e14 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,11 @@ -0.2.7 (2017-??-??) +0.2.7 (2017-07-31) ========================= - Some Firefox related changes (credits to projectgus) - Fixed Skip button function when choosing own credential fields +- Adjusted some callbacks +- Fixed showing an error message on the same tab when KeePassXC is instantly closed +- Added null checking for onDisconnected() +- Any Chrome related stuff is now disabled on options pages when using Firefox 0.2.6 (2017-07-23) ========================= diff --git a/keepassxc-browser/background/browserAction.js b/keepassxc-browser/background/browserAction.js index 310f14f..48a9951 100644 --- a/keepassxc-browser/background/browserAction.js +++ b/keepassxc-browser/background/browserAction.js @@ -249,7 +249,9 @@ function getValueOrDefault(settings, key, defaultVal, min) { val = defaultVal; } return val; - } catch(e) { return defaultVal; } + } catch(e) { + return defaultVal; + } } browserAction.generateIconName = function(iconType, icon) { diff --git a/keepassxc-browser/background/event.js b/keepassxc-browser/background/event.js index e10a89a..8dcddcf 100644 --- a/keepassxc-browser/background/event.js +++ b/keepassxc-browser/background/event.js @@ -90,6 +90,7 @@ event.showStatus = function(configured, tab, callback) { } browserAction.showDefault(null, tab); + const errorMessage = page.tabs[tab.id].errorMessage; callback({ identifier: keyId, configured: configured, @@ -97,7 +98,7 @@ event.showStatus = function(configured, tab, callback) { keePassXCAvailable: keepass.isKeePassXCAvailable, encryptionKeyUnrecognized: keepass.isEncryptionKeyUnrecognized, associated: keepass.isAssociated(), - error: page.tabs[tab.id].errorMessage + error: errorMessage ? errorMessage : null }); } diff --git a/keepassxc-browser/background/init.js b/keepassxc-browser/background/init.js index d9f3cfc..c50f71e 100644 --- a/keepassxc-browser/background/init.js +++ b/keepassxc-browser/background/init.js @@ -82,11 +82,9 @@ browser.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { }); // Retrieve Credentials and try auto-login for HTTPAuth requests -if (browser.webRequest.onAuthRequired) { - browser.webRequest.onAuthRequired.addListener(httpAuth.handleRequest, - { urls: [''] }, ['asyncBlocking'] - ); -} +browser.webRequest.onAuthRequired.addListener(httpAuth.handleRequest, + { urls: [''] }, ['asyncBlocking'] +); browser.runtime.onMessage.addListener(event.onMessage); diff --git a/keepassxc-browser/background/keepass.js b/keepassxc-browser/background/keepass.js index 2d11a80..d72b43d 100644 --- a/keepassxc-browser/background/keepass.js +++ b/keepassxc-browser/background/keepass.js @@ -45,6 +45,7 @@ const kpErrors = { KEY_CHANGE_FAILED: 9, ENCRYPTION_KEY_UNRECOGNIZED: 10, NO_SAVED_DATABASES_FOUND: 11, + errorMessages : { 0: { msg: 'Unknown error' }, 1: { msg: 'Database not opened' }, @@ -58,6 +59,10 @@ const kpErrors = { 9: { msg: 'Key change was not successful.' }, 10: { msg: 'Encryption key is not recognized' }, 11: { msg: 'No saved databases found.' } + }, + + getError(errorCode) { + return this.errorMessages[errorCode].msg; } }; @@ -139,6 +144,7 @@ keepass.retrieveCredentials = function (callback, tab, url, submiturl, forceCall page.tabs[tab.id].errorMessage = null; if (!keepass.isConnected) { + callback([]); return; } @@ -199,7 +205,7 @@ keepass.retrieveCredentials = function (callback, tab, url, submiturl, forceCall // Redirects the callback to a listener (handleReply()) keepass.callbackOnId = function (ev, id, callback) { - let listener = ( (port, id) => { + let listener = ((port, id) => { let handler = (msg) => { if (msg && msg.action === id) { ev.removeListener(handler); @@ -275,11 +281,13 @@ keepass.generatePassword = function (callback, tab, forceCallback) { keepass.associate = function(callback, tab) { if (keepass.isAssociated()) { + callback([]); return; } keepass.getDatabaseHash((res) => { if (keepass.isDatabaseClosed || !keepass.isKeePassXCAvailable) { + callback([]); return; } @@ -487,6 +495,7 @@ keepass.getDatabaseHash = function (callback, tab, triggerUnlock) { keepass.changePublicKeys = function(tab, callback) { if (!keepass.isConnected) { + callback([]); return; } @@ -652,11 +661,11 @@ keepass.onNativeMessage = function (response) { } function onDisconnected() { - console.log('Failed to connect: ' + browser.runtime.lastError.message); keepass.nativePort = null; keepass.isConnected = false; keepass.isDatabaseClosed = true; keepass.isKeePassXCAvailable = false; + console.log('Failed to connect: ' + (browser.runtime.lastError === null ? 'Unknown error' : browser.runtime.lastError.message)); } keepass.nativeConnect = function() { @@ -714,7 +723,7 @@ keepass.verifyResponse = function(response, nonce, id) { keepass.handleError = function(tab, errorCode, errorMessage = '') { if (errorMessage.length === 0) { - errorMessage = kpErrors.errorMessages[errorCode].msg; + errorMessage = kpErrors.getError(errorCode); } console.log('Error ' + errorCode + ': ' + errorMessage); if (tab && page.tabs[tab.id]) { diff --git a/keepassxc-browser/keepassxc-browser.js b/keepassxc-browser/keepassxc-browser.js index 279913e..6555a60 100644 --- a/keepassxc-browser/keepassxc-browser.js +++ b/keepassxc-browser/keepassxc-browser.js @@ -79,7 +79,6 @@ function _fs(fieldId) { } - var cipAutocomplete = {}; // objects of username + description for autocomplete diff --git a/keepassxc-browser/options/options.html b/keepassxc-browser/options/options.html index af22cca..d0e9d93 100644 --- a/keepassxc-browser/options/options.html +++ b/keepassxc-browser/options/options.html @@ -2,7 +2,7 @@ Settings | keepassxc-browser - + @@ -29,7 +29,8 @@

If you just want to insert username + password into the fields where your focus is, press Ctrl + Shift + U.
- If you only want to insert the password, just press Ctrl + Shift + P. You can customize these shortcuts on chrome://extensions/configureCommands page + If you only want to insert the password, just press Ctrl + Shift + P. + You can customize these shortcuts on chrome://extensions/configureCommands page

diff --git a/keepassxc-browser/options/options.js b/keepassxc-browser/options/options.js index 25286df..64cb05b 100644 --- a/keepassxc-browser/options/options.js +++ b/keepassxc-browser/options/options.js @@ -1,3 +1,8 @@ +var isFirefox = false; +if (typeof browser !== 'undefined') { + isFirefox = true; +} + window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); if (jQuery) { @@ -257,4 +262,7 @@ options.initSpecifiedCredentialFields = function() { options.initAbout = function() { $('#tab-about em.versionCIP').text(browser.runtime.getManifest().version); + if (isFirefox) { + $('#chrome-only').remove(); + } } diff --git a/keepassxc-browser/popups/popup.html b/keepassxc-browser/popups/popup.html index 76576db..c9af685 100644 --- a/keepassxc-browser/popups/popup.html +++ b/keepassxc-browser/popups/popup.html @@ -1,6 +1,7 @@ KeePassXC - Popup + diff --git a/keepassxc-browser/popups/popup_httpauth.html b/keepassxc-browser/popups/popup_httpauth.html index ff62344..afe2006 100644 --- a/keepassxc-browser/popups/popup_httpauth.html +++ b/keepassxc-browser/popups/popup_httpauth.html @@ -1,6 +1,7 @@ keepassxc-browser - Popup + diff --git a/keepassxc-browser/popups/popup_login.html b/keepassxc-browser/popups/popup_login.html index 4f02afe..5882ce9 100644 --- a/keepassxc-browser/popups/popup_login.html +++ b/keepassxc-browser/popups/popup_login.html @@ -1,6 +1,7 @@ KeePassXC - Popup + diff --git a/keepassxc-browser/popups/popup_multiple-fields.html b/keepassxc-browser/popups/popup_multiple-fields.html index f185875..2b6339c 100644 --- a/keepassxc-browser/popups/popup_multiple-fields.html +++ b/keepassxc-browser/popups/popup_multiple-fields.html @@ -1,6 +1,7 @@ keepassxc-browser - Popup + diff --git a/keepassxc-browser/popups/popup_remember.html b/keepassxc-browser/popups/popup_remember.html index 689f3ec..6f58a39 100644 --- a/keepassxc-browser/popups/popup_remember.html +++ b/keepassxc-browser/popups/popup_remember.html @@ -1,6 +1,7 @@ keepassxc-browser - Popup + From bdc215385aa9508912fe1a576d57d4b28209ac54 Mon Sep 17 00:00:00 2001 From: varjolintu Date: Mon, 31 Jul 2017 14:16:05 +0300 Subject: [PATCH 4/4] More error message related fixes --- keepassxc-browser/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keepassxc-browser/manifest.json b/keepassxc-browser/manifest.json index 28b7e0d..cee5a75 100644 --- a/keepassxc-browser/manifest.json +++ b/keepassxc-browser/manifest.json @@ -84,7 +84,7 @@ "applications": { "gecko": { "id": "keepassxc-browser@sami.vanttinen", - "strict_min_version": "54.0" + "strict_min_version": "56.0a1" } } }