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:
@@ -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(() => {});
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user