feat: add support for ChatGPT, Grok, Gemini, and OpenWebUI

Extend Silent Send to intercept API requests on all major AI chat
services. Each service has different API shapes:

- ChatGPT: /backend-api/conversation with content.parts arrays
- Grok: GraphQL + /2/grok/add_response with message field
- Gemini: form-encoded f.req with nested arrays (+ generateContent)
- OpenWebUI: /api/chat and /ollama/api/chat (self-hosted)

All services share the same substitution pipeline. Manifests updated
for both Chrome and Firefox with host_permissions for all domains.
OpenWebUI supported via localhost/127.0.0.1 for self-hosted instances.

https://claude.ai/code/session_01Dvgwe7XMoSxnWXkih8p1Cw
This commit is contained in:
Claude
2026-03-26 00:27:07 +00:00
parent 34f1131c23
commit 6e3249b8ff
6 changed files with 220 additions and 50 deletions
+19 -7
View File
@@ -88,13 +88,25 @@ const messageHandlers = {
async 'update:settings'(message) {
await Storage.saveSettings(message.settings);
// Broadcast to content scripts
const tabs = await api.tabs.query({ url: 'https://claude.ai/*' });
for (const tab of tabs) {
api.tabs.sendMessage(tab.id, {
type: 'settings:updated',
settings: message.settings,
}).catch(() => {});
// Broadcast to content scripts on all supported sites
const SUPPORTED_URLS = [
'https://claude.ai/*',
'https://chatgpt.com/*',
'https://chat.openai.com/*',
'https://grok.x.ai/*',
'https://x.com/i/grok*',
'https://gemini.google.com/*',
'http://localhost/*',
'http://127.0.0.1/*',
];
for (const urlPattern of SUPPORTED_URLS) {
const tabs = await api.tabs.query({ url: urlPattern }).catch(() => []);
for (const tab of tabs) {
api.tabs.sendMessage(tab.id, {
type: 'settings:updated',
settings: message.settings,
}).catch(() => {});
}
}
},
};