diff --git a/src/backend/extension/messaging.ts b/src/backend/extension/messaging.ts index 4594fb23..6d1f32fd 100644 --- a/src/backend/extension/messaging.ts +++ b/src/backend/extension/messaging.ts @@ -36,31 +36,19 @@ function sendMessage( export async function sendExtensionRequest( ops: Omit, ): Promise | null> { - return sendMessage("makeRequest", { - requestDomain: window.location.origin, // TODO unsafe - ...ops, - }); + return sendMessage("makeRequest", ops); } export async function setDomainRule( ops: Omit, ): Promise { - return sendMessage("prepareStream", { - requestDomain: window.location.origin, - ...ops, - }); + return sendMessage("prepareStream", ops); } export async function extensionInfo(): Promise< MessagesMetadata["hello"]["res"] | null > { - const message = await sendMessage( - "hello", - { - requestDomain: window.location.origin, - }, - 300, - ); + const message = await sendMessage("hello", {}, 300); if (!message?.success) return null; if (!message.allowed) return null; return message; diff --git a/src/backend/extension/plasmo.ts b/src/backend/extension/plasmo.ts index e142ef6a..12222b22 100644 --- a/src/backend/extension/plasmo.ts +++ b/src/backend/extension/plasmo.ts @@ -1,6 +1,4 @@ -export interface ExtensionBaseRequest { - requestDomain: string; -} +export interface ExtensionBaseRequest {} export type ExtensionBaseResponse = | ({