Open Bug 1917966 Opened 2 years ago Updated 2 years ago

Content Scripts not injected into AI Chat sidebar

Categories

(Core :: Machine Learning: General, enhancement)

Firefox 130
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: stephen.swanson, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0

Steps to reproduce:

In about:config I changed browser.ml.chat.provider to https://chat.example.com. I also have a browser extension with manifest keys that look like this:

...
  "permissions": [
    "activeTab",
    "https://chat.example.com/*",
    "tabs"
  ],
...
  "content_scripts": [
  {
    "matches": ["https://chat.example.com/*"],
    "js": ["content_scripts/content.js"]
  }

content.js looks like this (for testing purposes:

(function () {
  fetch(`http://localhost:8080?url=${window.location}`, {"mode": "no-cors"}).catch((e) => {console.log(e)})
})();

Actual results:

When I browse to https://chat.example.com, I get a callback from my browser extension, however, when I open the ai chat sidebar, I do not receive the callback, indicating that the content script is not loaded.

Expected results:

The browser extension should load the script and I should receive the callback.

This is potentially a permissions issue, but I don't see a reason why browser extensions should be disallowed in the ai chat window, especially since it might be helpful for many users to write extensions to help with accessibility or compatibility with more AI providers.

The Bugbug bot thinks this bug should belong to the 'Core::Machine Learning' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Machine Learning
Product: Firefox → Core
You need to log in before you can comment on or make changes to this bug.