Merge pull request #1434 from keepassxreboot/feature/add_reload_extension_shortcut

Add support for reload extension shortcut
This commit is contained in:
Sami Vänttinen 2021-10-30 17:56:21 +03:00 committed by GitHub
commit 067ac51822
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View file

@ -146,7 +146,8 @@ browser.commands.onCommand.addListener(async (command) => {
if (contextMenuItems.some(e => e.action === command)
|| command === 'redetect_fields'
|| command === 'choose_credential_fields'
|| command === 'retrive_credentials_forced') {
|| command === 'retrive_credentials_forced'
|| command === 'reload_extension') {
const tabs = await browser.tabs.query({ active: true, currentWindow: true });
if (tabs.length) {
browser.tabs.sendMessage(tabs[0].id, { action: command });

View file

@ -2108,6 +2108,8 @@ browser.runtime.onMessage.addListener(async function(req, sender) {
kpxc.inputs = [];
kpxc.combinations = [];
kpxc.initCredentialFields();
} else if (req.action === 'reload_extension') {
sendMessage('reconnect');
} else if (req.action === 'save_credentials') {
kpxc.rememberCredentialsFromContextMenu();
} else if (req.action === 'retrive_credentials_forced') {

View file

@ -111,6 +111,9 @@
},
"request_autotype": {
"description": "__MSG_contextMenuRequestGlobalAutoType__"
},
"reload_extension": {
"description": "__MSG_popupReloadButton__"
}
},
"web_accessible_resources": [