From 07fd0401862a4451da96d4f5d843f55a2564e423 Mon Sep 17 00:00:00 2001 From: turbocrime Date: Thu, 22 Aug 2024 14:46:57 -0700 Subject: [PATCH] inject request method --- apps/extension/src/content-scripts/injected-penumbra-global.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/extension/src/content-scripts/injected-penumbra-global.ts b/apps/extension/src/content-scripts/injected-penumbra-global.ts index 1e3f6639..1abb261f 100644 --- a/apps/extension/src/content-scripts/injected-penumbra-global.ts +++ b/apps/extension/src/content-scripts/injected-penumbra-global.ts @@ -57,6 +57,7 @@ class PraxInjection { private stateEvents = new EventTarget(); private injection: Readonly = Object.freeze({ + request: () => this.postConnectRequest().then(() => Promise.resolve()), connect: () => Promise.resolve(this.port ?? this.postConnectRequest()), disconnect: () => this.postDisconnectRequest(), isConnected: () => Boolean(this.port && this.presentState === PenumbraState.Connected),