From 2c32fa1e13d7cdb22ef6bc351ee7740c54c06ea0 Mon Sep 17 00:00:00 2001 From: Athou Date: Tue, 13 Jun 2023 10:29:18 +0200 Subject: [PATCH] make "b" keyboard shortcut work in extension popup --- commafeed-client/src/hooks/useBrowserExtension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commafeed-client/src/hooks/useBrowserExtension.ts b/commafeed-client/src/hooks/useBrowserExtension.ts index 1198215b..561f18bc 100644 --- a/commafeed-client/src/hooks/useBrowserExtension.ts +++ b/commafeed-client/src/hooks/useBrowserExtension.ts @@ -25,9 +25,9 @@ export const useBrowserExtension = () => { return () => observer.disconnect() }, []) - const isBrowserExtensionInstalled = !!browserExtensionVersion // when not in an iframe, window.parent is a reference to window const isBrowserExtensionPopup = window.parent !== window + const isBrowserExtensionInstalled = isBrowserExtensionPopup || !!browserExtensionVersion const isBrowserExtensionInstallable = !isBrowserExtensionPopup const w = isBrowserExtensionPopup ? window.parent : window