1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 06:43:35 +00:00

added hotkey commands to launch browser action popup and generate new password

This commit is contained in:
Kyle Spearrin
2016-10-08 16:37:50 -04:00
parent 71e92d83f8
commit 691d2625d7
2 changed files with 24 additions and 0 deletions

View File

@@ -11,6 +11,15 @@ var autofillService = new AutofillService();
var passwordGenerationService = new PasswordGenerationService();
var appIdService = new AppIdService();
chrome.commands.onCommand.addListener(function (command) {
if (command === 'generate_password') {
passwordGenerationService.getOptions().then(function (options) {
var password = passwordGenerationService.generatePassword(options);
copyToClipboard(password);
});
}
});
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {
if (msg.command === 'loggedOut') {
setIcon(true);