browser.runtime.onMessage.addListener(async (msg) => { if (msg.type !== "send") return; console.log("sending message to", msg.host); await fetch(msg.host, { method: "POST", headers: { "Content-Type": "application/json" }, body: msg.data }); return { ok: true }; });