feat: add AI services and developer/support sites to built-in domains

New AI sites: Perplexity, Copilot, DeepSeek, HuggingChat, Poe
Developer/support: GitHub, GitLab, Reddit (www + old), Stack Overflow, Pastebin

The existing interception is service-agnostic — it scans all JSON strings
in POST/PUT/PATCH requests through the 4-stage substitution pipeline.
No site-specific handling needed; all sites use the same method.

https://claude.ai/code/session_01KF4i7Ra7zCEDskxDBaNtcT
This commit is contained in:
Claude
2026-03-27 21:12:13 +00:00
parent 66b497f94b
commit e6e9894d99
4 changed files with 59 additions and 1 deletions
+22
View File
@@ -23,6 +23,17 @@
"https://grok.x.ai/*", "https://grok.x.ai/*",
"https://x.com/i/grok*", "https://x.com/i/grok*",
"https://gemini.google.com/*", "https://gemini.google.com/*",
"https://www.perplexity.ai/*",
"https://copilot.microsoft.com/*",
"https://chat.deepseek.com/*",
"https://huggingface.co/chat/*",
"https://poe.com/*",
"https://github.com/*",
"https://gitlab.com/*",
"https://www.reddit.com/*",
"https://old.reddit.com/*",
"https://stackoverflow.com/*",
"https://pastebin.com/*",
"http://localhost/*", "http://localhost/*",
"http://127.0.0.1/*" "http://127.0.0.1/*"
], ],
@@ -39,6 +50,17 @@
"https://grok.x.ai/*", "https://grok.x.ai/*",
"https://x.com/i/grok*", "https://x.com/i/grok*",
"https://gemini.google.com/*", "https://gemini.google.com/*",
"https://www.perplexity.ai/*",
"https://copilot.microsoft.com/*",
"https://chat.deepseek.com/*",
"https://huggingface.co/chat/*",
"https://poe.com/*",
"https://github.com/*",
"https://gitlab.com/*",
"https://www.reddit.com/*",
"https://old.reddit.com/*",
"https://stackoverflow.com/*",
"https://pastebin.com/*",
"http://localhost/*", "http://localhost/*",
"http://127.0.0.1/*" "http://127.0.0.1/*"
], ],
+22
View File
@@ -17,6 +17,17 @@
"https://grok.x.ai/*", "https://grok.x.ai/*",
"https://x.com/i/grok*", "https://x.com/i/grok*",
"https://gemini.google.com/*", "https://gemini.google.com/*",
"https://www.perplexity.ai/*",
"https://copilot.microsoft.com/*",
"https://chat.deepseek.com/*",
"https://huggingface.co/chat/*",
"https://poe.com/*",
"https://github.com/*",
"https://gitlab.com/*",
"https://www.reddit.com/*",
"https://old.reddit.com/*",
"https://stackoverflow.com/*",
"https://pastebin.com/*",
"http://localhost/*", "http://localhost/*",
"http://127.0.0.1/*" "http://127.0.0.1/*"
], ],
@@ -33,6 +44,17 @@
"https://grok.x.ai/*", "https://grok.x.ai/*",
"https://x.com/i/grok*", "https://x.com/i/grok*",
"https://gemini.google.com/*", "https://gemini.google.com/*",
"https://www.perplexity.ai/*",
"https://copilot.microsoft.com/*",
"https://chat.deepseek.com/*",
"https://huggingface.co/chat/*",
"https://poe.com/*",
"https://github.com/*",
"https://gitlab.com/*",
"https://www.reddit.com/*",
"https://old.reddit.com/*",
"https://stackoverflow.com/*",
"https://pastebin.com/*",
"http://localhost/*", "http://localhost/*",
"http://127.0.0.1/*" "http://127.0.0.1/*"
], ],
+14
View File
@@ -21,12 +21,26 @@ const tabCounts = new Map();
// Built-in URL patterns // Built-in URL patterns
const BUILTIN_URL_PATTERNS = [ const BUILTIN_URL_PATTERNS = [
// AI services
'https://claude.ai/*', 'https://claude.ai/*',
'https://chatgpt.com/*', 'https://chatgpt.com/*',
'https://chat.openai.com/*', 'https://chat.openai.com/*',
'https://grok.x.ai/*', 'https://grok.x.ai/*',
'https://x.com/i/grok*', 'https://x.com/i/grok*',
'https://gemini.google.com/*', 'https://gemini.google.com/*',
'https://www.perplexity.ai/*',
'https://copilot.microsoft.com/*',
'https://chat.deepseek.com/*',
'https://huggingface.co/chat/*',
'https://poe.com/*',
// Developer & support sites
'https://github.com/*',
'https://gitlab.com/*',
'https://www.reddit.com/*',
'https://old.reddit.com/*',
'https://stackoverflow.com/*',
'https://pastebin.com/*',
// Local
'http://localhost/*', 'http://localhost/*',
'http://127.0.0.1/*', 'http://127.0.0.1/*',
]; ];
+1 -1
View File
@@ -603,7 +603,7 @@ function renderDomains() {
const domains = settings.customDomains || []; const domains = settings.customDomains || [];
if (domains.length === 0) { if (domains.length === 0) {
safeHTML(list, '<div style="text-align:center;color:#9ca3af;padding:12px;font-size:13px">No custom domains. Built-in sites (Claude, ChatGPT, Grok, Gemini, localhost) are always active.</div>'); safeHTML(list, '<div style="text-align:center;color:#9ca3af;padding:12px;font-size:13px">No custom domains. Built-in sites (Claude, ChatGPT, Gemini, Grok, Perplexity, Copilot, DeepSeek, HuggingChat, Poe, GitHub, GitLab, Reddit, Stack Overflow, Pastebin, localhost) are always active.</div>');
return; return;
} }