Wire up document scanner for file upload interception, bump to 0.9.23
- Inject document-scanner.js into page world via injector.js (as module, sets globalThis.DocumentScanner) - Add FormData interception to fetch hook: scans File/Blob entries through DocumentScanner.processUpload(), also substitutes string fields - Add document-scanner.js to web_accessible_resources in both manifests - Bump version to 0.9.23 in package.json, manifest.json, manifest.firefox.json https://claude.ai/code/session_01NNBEPuXMFGWezJb1f958nL
This commit is contained in:
@@ -70,6 +70,14 @@
|
||||
// Merge active profiles into a flat identity object for the content script
|
||||
const identity = mergeProfiles(identityData);
|
||||
|
||||
// Inject the document scanner into the page's world first (sets globalThis.DocumentScanner)
|
||||
const docScannerScript = document.createElement('script');
|
||||
docScannerScript.type = 'module';
|
||||
docScannerScript.src = api.runtime.getURL('src/lib/document-scanner.js');
|
||||
(document.head || document.documentElement).appendChild(docScannerScript);
|
||||
await new Promise(resolve => { docScannerScript.onload = resolve; docScannerScript.onerror = resolve; });
|
||||
docScannerScript.remove();
|
||||
|
||||
// Inject the main interception script into the page's world
|
||||
const script = document.createElement('script');
|
||||
script.setAttribute('data-ss-config', JSON.stringify({ mappings, identity, settings }));
|
||||
|
||||
Reference in New Issue
Block a user