From de1d26bd8d2906b64e5f75ae68ee0f0d0ff0db4e Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Tue, 19 Oct 2021 16:10:43 +0200 Subject: [PATCH] Add messageListener for unlockCompleted --- src/background/contextMenus.background.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/background/contextMenus.background.ts b/src/background/contextMenus.background.ts index 5ec1b46fbe4..a9173f2dfed 100644 --- a/src/background/contextMenus.background.ts +++ b/src/background/contextMenus.background.ts @@ -40,6 +40,12 @@ export default class ContextMenusBackground { await this.cipherAction(tab, info); } }); + + BrowserApi.messageListener('contextmenus.background', async (msg: any, sender: chrome.runtime.MessageSender, sendResponse: any) => { + if (msg.command === 'unlockCompleted' && msg.data.target === 'contextmenus.background') { + await this.cipherAction(msg.data.commandToRetry.sender.tab, msg.data.commandToRetry.msg.data); + } + }); } private async generatePasswordToClipboard() {