diff --git a/README.md b/README.md index c87deb2..9628412 100644 --- a/README.md +++ b/README.md @@ -67,17 +67,13 @@ A browser extension (Chrome, Firefox, and Safari) that intercepts personal infor | `123-45-6789` | `[REDACTED-SSN]` | | `4111 1111 1111 1111` | `[REDACTED-CARD]` | -### Proper noun detection (automatic) +### Proper noun detection (opt-in) -The auto-detect scanner also catches capitalized words mid-sentence that might be names, company names, or project names you forgot to configure. For example: +The auto-detect scanner can optionally flag capitalized phrases that might be names, company names, or project names you forgot to configure. **Disabled by default** because it can produce false positives on normal phrases like "Getting Started" or "Generate Design". -| You type | What happens | -|----------|-------------| -| `...talked to Sarah about the deploy` | Flags "Sarah" as a possible name | -| `...the Acme Corp internal API` | Flags "Acme Corp" as a possible organization | -| `...pushed to Project Atlas staging` | Flags "Project Atlas" as a possible project name | +Enable it in the popup → Options tab → **Detect proper nouns**. -These are flagged as warnings (not auto-redacted) so you can decide whether to add them as mappings. Common English words, programming terms, days, and months are excluded to reduce false positives. +When enabled, phrases like "Acme Corp" or "Project Atlas" will be flagged as warnings so you can decide whether to add them as mappings. You can click "ignore" on any false positive to permanently dismiss it. ### Bulk import (speed up setup) diff --git a/src/content/content.js b/src/content/content.js index 47fd4e5..b0020fe 100644 --- a/src/content/content.js +++ b/src/content/content.js @@ -604,9 +604,11 @@ } // Proper noun heuristic — catch names, company names, project names - // that aren't configured in identity - const properNouns = detectProperNouns(text, configured); - findings.push(...properNouns); + // Disabled by default (too many false positives). Enable in Options. + if (settings.detectProperNouns) { + const properNouns = detectProperNouns(text, configured); + findings.push(...properNouns); + } // Deduplicate by value const seen = new Set(); diff --git a/src/lib/auto-detect.js b/src/lib/auto-detect.js index bea7464..e44ac75 100644 --- a/src/lib/auto-detect.js +++ b/src/lib/auto-detect.js @@ -136,7 +136,7 @@ const AutoDetect = { * * Returns array of { name, value, hint, category, index } */ - scan(text, identity) { + scan(text, identity, options) { if (!text || text.length < 5) return []; const hasContext = CONTEXT_WORDS.test(text); @@ -194,8 +194,11 @@ const AutoDetect = { } // Proper noun heuristic — catch names, company names, project names - const properNouns = this._detectProperNouns(text, configured); - findings.push(...properNouns); + // Disabled by default (too many false positives). Pass detectProperNouns: true to enable. + if (options?.detectProperNouns) { + const properNouns = this._detectProperNouns(text, configured); + findings.push(...properNouns); + } // Deduplicate overlapping matches findings.sort((a, b) => (a.index || 0) - (b.index || 0)); diff --git a/src/popup/popup.html b/src/popup/popup.html index 38c8635..8785a7c 100644 --- a/src/popup/popup.html +++ b/src/popup/popup.html @@ -236,6 +236,14 @@ +
Sync, encryption, org, version history, import/export, and more
diff --git a/src/popup/popup.js b/src/popup/popup.js index 2f9e75d..3743790 100644 --- a/src/popup/popup.js +++ b/src/popup/popup.js @@ -225,6 +225,7 @@ async function initUnlockedUI() { $('#optAutoRedact').checked = settings.autoRedactDetected !== false; $('#optHighlights').checked = settings.showHighlights || false; $('#optDocPreview').checked = settings.docScanPreview !== false; + $('#optProperNouns').checked = settings.detectProperNouns || false; // Options tab change handlers const optHandlers = [ @@ -233,6 +234,7 @@ async function initUnlockedUI() { ['optAutoRedact', 'autoRedactDetected'], ['optHighlights', 'showHighlights'], ['optDocPreview', 'docScanPreview'], + ['optProperNouns', 'detectProperNouns'], ]; for (const [id, key] of optHandlers) { $(`#${id}`).addEventListener('change', async (e) => {