|
Detect login fields with a scoring classifier instead of heuristics
field-detect.js is a pure UMD module: every input becomes a descriptor (name/id/placeholder/aria-label/label text, visibility state, type, autocomplete token) scored against multilingual keyword tables with anti-keywords for traps (search, newsletter, cc, otp and now repeat- password fields). findLoginTargets pairs one username with one password per form context, merges confirm-password pairs, and falls back to the closest preceding input in anonymous SPA forms. content.js reduces to DOM probing (descriptor building + scan) and the card/interceptor flow; the manifest loads field-detect.js first. The module is unit-tested without a browser via tools/test-field-detect.js (16 plain-node cases over a fake tree) and verified end-to-end in Chromium on a page mixing russian placeholders, newsletter/search/otp/cc traps and a confirm-password signup form: three cards, correct pairs, Use fills the right fields only. Makefile: the per-file $(SRC) replaces the directory prerequisite (a stale edit inside src/ never rebuilt the bundles), recipes copy with cp --parents, and make test runs the node suite. Co-Authored-By: Claude Code <noreply@anthropic.com> |
|---|
|
|
| extensions/extension/Makefile |
|---|
| extensions/extension/manifest.json |
|---|
| extensions/extension/src/content.js |
|---|
| extensions/extension/src/field-detect.js 0 → 100644 |
|---|
| extensions/extension/tools/test-field-detect.js 0 → 100644 |
|---|