0

I am creating a chrome extension. It injects a chat to the page of the user choice. It works on all websites I checked but does not on a specific one. I have a component called , when I click the button to inject the chat in the Popup.html it sends console.log to the page, from that component, but the component is not being rendered for some reason. That's the page https://p.priority-connect.online/webui/P3A3E/

I tried to render it on another websites and it worked well. Created console.log inside the component and received result inside the website console but not a rendered component.

that's my manifest file

    {
  "manifest_version": 3,
  "name": "WhatsApp Chat",
  "description": "A chrome extension boilerplate built with React 17, Webpack 5, and Webpack Dev Server 4",
  "options_page": "options.html",
  "background": {
    "service_worker": "background.bundle.js"
  },
  "action": {
    "default_popup": "popup.html",
    "default_icon": "icon-34.png"
  },
  "icons": {
    "128": "icon-128.png"
  },
  "content_scripts": [
    {
      "matches": [
        "http://*/*",
        "https://*/*",
        "<all_urls>"
      ],
      "js": [
        "contentScript.bundle.js"
      ],
      "css": [
        "content.styles.css"
      ]
    }
  ],
  "devtools_page": "devtools.html",
  "web_accessible_resources": [
    {
      "resources": [
        "content.styles.css",
        "icon-128.png",
        "icon-34.png",
        "assets/img/*"
      ],
      "matches": [
        "<all_urls>"
      ]
    }
  ]
}
  • You'll have to place the chat inside your own web_accessible_resources iframe ([example for MV2](https://stackoverflow.com/a/24649134)) or modify the CSP header of that site to allow your chat URL. – wOxxOm Dec 08 '22 at 19:50
  • @wOxxOm, thanks a lot, I would not be able to figure it out without your help. you are the best;) – Eugene Skomorokhov Dec 09 '22 at 09:41

0 Answers0