Fixed XML display error, context menu on password fields with Firefox, changed fill-password keyboard shortcuts

This commit is contained in:
varjolintu 2017-11-08 12:28:44 +02:00
parent d91ccf3914
commit 4b0420d27d
2 changed files with 17 additions and 8 deletions

View file

@ -92,17 +92,23 @@ if (browser.webRequest.onAuthRequired) {
browser.runtime.onMessage.addListener(kpxcEvent.onMessage); browser.runtime.onMessage.addListener(kpxcEvent.onMessage);
const contextMenuItems = [ const contextMenuItems = [
{title: 'Fill &User + Pass', action: 'fill_user_pass'}, {title: 'Fill User + Pass', action: 'fill_user_pass'},
{title: 'Fill &Pass Only', action: 'fill_pass_only'}, {title: 'Fill Pass Only', action: 'fill_pass_only'},
{title: 'Show Password &Generator Icons', action: 'activate_password_generator'}, {title: 'Show Password Generator Icons', action: 'activate_password_generator'},
{title: '&Save credentials', action: 'remember_credentials'} {title: 'Save credentials', action: 'remember_credentials'}
]; ];
let menuContexts = ['editable'];
if (isFirefox()) {
menuContexts.push('password');
}
// Create context menu items // Create context menu items
for (const item of contextMenuItems) { for (const item of contextMenuItems) {
browser.contextMenus.create({ browser.contextMenus.create({
title: item.title, title: item.title,
contexts: [ 'editable' ], contexts: menuContexts,
onclick: (info, tab) => { onclick: (info, tab) => {
browser.tabs.sendMessage(tab.id, { browser.tabs.sendMessage(tab.id, {
action: item.action action: item.action

View file

@ -1,7 +1,7 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "keepassxc-browser", "name": "keepassxc-browser",
"version": "0.3.9", "version": "0.4.0",
"description": "KeePassXC integration for modern web browsers", "description": "KeePassXC integration for modern web browsers",
"author": "Sami Vänttinen", "author": "Sami Vänttinen",
"icons": { "icons": {
@ -41,6 +41,9 @@
"matches": [ "matches": [
"<all_urls>" "<all_urls>"
], ],
"exclude_matches": [
"*://*/*.xml"
],
"js": [ "js": [
"browser-polyfill.min.js", "browser-polyfill.min.js",
"global.js", "global.js",
@ -67,8 +70,8 @@
"fill-password": { "fill-password": {
"description": "Insert a password", "description": "Insert a password",
"suggested_key": { "suggested_key": {
"default": "Ctrl+Shift+P", "default": "Alt+Shift+P",
"mac": "Command+Shift+P" "mac": "Alt+Shift+P"
} }
} }
}, },