From 4b0420d27d693e7ec00cba6f84b78d1b760795cd Mon Sep 17 00:00:00 2001 From: varjolintu Date: Wed, 8 Nov 2017 12:28:44 +0200 Subject: [PATCH] Fixed XML display error, context menu on password fields with Firefox, changed fill-password keyboard shortcuts --- keepassxc-browser/background/init.js | 16 +++++++++++----- keepassxc-browser/manifest.json | 9 ++++++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/keepassxc-browser/background/init.js b/keepassxc-browser/background/init.js index a57cad3..4d58c68 100644 --- a/keepassxc-browser/background/init.js +++ b/keepassxc-browser/background/init.js @@ -92,17 +92,23 @@ if (browser.webRequest.onAuthRequired) { browser.runtime.onMessage.addListener(kpxcEvent.onMessage); const contextMenuItems = [ - {title: 'Fill &User + Pass', action: 'fill_user_pass'}, - {title: 'Fill &Pass Only', action: 'fill_pass_only'}, - {title: 'Show Password &Generator Icons', action: 'activate_password_generator'}, - {title: '&Save credentials', action: 'remember_credentials'} + {title: 'Fill User + Pass', action: 'fill_user_pass'}, + {title: 'Fill Pass Only', action: 'fill_pass_only'}, + {title: 'Show Password Generator Icons', action: 'activate_password_generator'}, + {title: 'Save credentials', action: 'remember_credentials'} ]; +let menuContexts = ['editable']; + +if (isFirefox()) { + menuContexts.push('password'); +} + // Create context menu items for (const item of contextMenuItems) { browser.contextMenus.create({ title: item.title, - contexts: [ 'editable' ], + contexts: menuContexts, onclick: (info, tab) => { browser.tabs.sendMessage(tab.id, { action: item.action diff --git a/keepassxc-browser/manifest.json b/keepassxc-browser/manifest.json index 98bec40..9ca67fd 100644 --- a/keepassxc-browser/manifest.json +++ b/keepassxc-browser/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "keepassxc-browser", - "version": "0.3.9", + "version": "0.4.0", "description": "KeePassXC integration for modern web browsers", "author": "Sami Vänttinen", "icons": { @@ -41,6 +41,9 @@ "matches": [ "" ], + "exclude_matches": [ + "*://*/*.xml" + ], "js": [ "browser-polyfill.min.js", "global.js", @@ -67,8 +70,8 @@ "fill-password": { "description": "Insert a password", "suggested_key": { - "default": "Ctrl+Shift+P", - "mac": "Command+Shift+P" + "default": "Alt+Shift+P", + "mac": "Alt+Shift+P" } } },