console.log("VendorGet content listener loaded:", window.location.href);

window.addEventListener("VendorGetFromPage", async (event) => {

  console.log("VendorGet message from page:", event.detail);

  await browser.runtime.sendMessage({
    type: "vendorget_capture",
    payload: event.detail
  });

});

const script = document.createElement("script");

script.src = browser.runtime.getURL("src/injected/tcf-bridge.js");

script.onload = () => script.remove();

(document.documentElement || document.head || document.body).appendChild(script);
