autofill command, adjust default commands
This commit is contained in:
parent
60b8c1aec3
commit
ee6fb78583
|
@ -31,6 +31,17 @@ if (chrome.commands) {
|
||||||
bg_utilsService.copyToClipboard(password);
|
bg_utilsService.copyToClipboard(password);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else if (command === 'autofill_login') {
|
||||||
|
chrome.tabs.query({ active: true }, function (tabs) {
|
||||||
|
if (tabs.length) {
|
||||||
|
ga('send', {
|
||||||
|
hitType: 'event',
|
||||||
|
eventAction: 'Autofilled From Command'
|
||||||
|
});
|
||||||
|
collectPageDetailsForContentScript(tabs[0], 'autofill_cmd');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +93,7 @@ chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {
|
||||||
var forms = bg_autofillService.getFormsWithPasswordFields(msg.details);
|
var forms = bg_autofillService.getFormsWithPasswordFields(msg.details);
|
||||||
messageTab(msg.tab.id, 'pageDetails', { details: msg.details, forms: forms });
|
messageTab(msg.tab.id, 'pageDetails', { details: msg.details, forms: forms });
|
||||||
}
|
}
|
||||||
else if (msg.sender === 'autofiller') {
|
else if (msg.sender === 'autofiller' || msg.sender === 'autofill_cmd') {
|
||||||
bg_autofillService.doAutoFillForLastUsedLogin([{
|
bg_autofillService.doAutoFillForLastUsedLogin([{
|
||||||
frameId: sender.frameId, tab: msg.tab, details: msg.details
|
frameId: sender.frameId, tab: msg.tab, details: msg.details
|
||||||
}]);
|
}]);
|
||||||
|
|
|
@ -75,15 +75,22 @@
|
||||||
"https://*/*"
|
"https://*/*"
|
||||||
],
|
],
|
||||||
"commands": {
|
"commands": {
|
||||||
|
"autofill_login": {
|
||||||
|
"suggested_key": {
|
||||||
|
"default": "Ctrl+Shift+L"
|
||||||
|
},
|
||||||
|
"description": "Auto-fill the last used login for the current website."
|
||||||
|
},
|
||||||
"generate_password": {
|
"generate_password": {
|
||||||
"suggested_key": {
|
"suggested_key": {
|
||||||
"default": "Ctrl+Shift+O"
|
"default": "Ctrl+Shift+Period"
|
||||||
},
|
},
|
||||||
"description": "Generate and copy a new random password to the clipboard."
|
"description": "Generate and copy a new random password to the clipboard."
|
||||||
},
|
},
|
||||||
"_execute_browser_action": {
|
"_execute_browser_action": {
|
||||||
"suggested_key": {
|
"suggested_key": {
|
||||||
"default": "Ctrl+Shift+Y"
|
"default": "Ctrl+Shift+Y",
|
||||||
|
"linux": "Ctrl+Shift+U"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue