ChatGPT (and potentially other AI services) calls fetch() with a Request object as the first argument: fetch(new Request(url, opts)) instead of fetch(url, opts). The interceptor only handled the second form, so ChatGPT's conversation requests passed through unmodified. Fixed by handling both fetch signatures: - fetch(url, options) — existing path - fetch(Request) — new: extracts URL, method, headers, reads body via request.text() for JSON/text content types Also handles non-string body types: - Blob → text via blob.text() - ArrayBuffer → text via TextDecoder - URLSearchParams → string via toString() These cover the various ways modern frameworks call fetch(). https://claude.ai/code/session_01SWSwDfMVij53bCTNSCLMwn
19 lines
572 B
JSON
19 lines
572 B
JSON
{
|
|
"name": "silent-send",
|
|
"version": "2.0.6",
|
|
"private": true,
|
|
"license": "BSL-1.1",
|
|
"description": "Browser extension that substitutes personal data before sending to AI services",
|
|
"scripts": {
|
|
"build:chrome": "./build.sh chrome",
|
|
"build:firefox": "./build.sh firefox",
|
|
"build": "./build.sh both",
|
|
"lint:firefox": "npx web-ext lint --source-dir dist/firefox",
|
|
"sign:firefox": "./sign-firefox.sh",
|
|
"run:firefox": "./build.sh firefox && npx web-ext run --source-dir dist/firefox"
|
|
},
|
|
"devDependencies": {
|
|
"web-ext": "^8.4.0"
|
|
}
|
|
}
|