feat: pre-send PPI detection — warns while typing, auto-add mappings
Like spellcheck for privacy. Scans text as you type and paste into chat inputs (debounced 800ms). Shows a dark floating warning panel listing detected PPI BEFORE you hit Enter. Each detected item has a green [+] button that instantly: 1. Generates a plausible fake value (random IP, fake address, etc.) 2. Adds it as a mapping to storage 3. Shows a checkmark to confirm The warning disappears when you clear the text or when all detected items have been addressed. Three new Options toggles: - Auto-detect unconfigured PPI (on by default) - Offer to auto-add detected PPI (on by default) Also adds a storage bridge (postMessage) so the page-world content script can read/write chrome.storage through the injector. https://claude.ai/code/session_01Dvgwe7XMoSxnWXkih8p1Cw
This commit is contained in:
@@ -126,6 +126,24 @@
|
||||
}, '*');
|
||||
}
|
||||
});
|
||||
|
||||
// Storage bridge — lets page world script read/write storage
|
||||
window.addEventListener('message', async (event) => {
|
||||
if (event.source !== window) return;
|
||||
|
||||
if (event.data?.type === 'ss:storage-get') {
|
||||
const result = await api.storage.local.get(event.data.key);
|
||||
window.postMessage({
|
||||
type: 'ss:storage-result',
|
||||
id: event.data.id,
|
||||
value: result[event.data.key] || null,
|
||||
}, '*');
|
||||
}
|
||||
|
||||
if (event.data?.type === 'ss:storage-set') {
|
||||
await api.storage.local.set({ [event.data.key]: event.data.value });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
Reference in New Issue
Block a user