Add cross-browser popup status handling

This commit is contained in:
Jordan Wages 2026-08-24 23:32:27 -05:00
commit 7e17470356
38 changed files with 1242 additions and 199 deletions

View file

@ -61,26 +61,23 @@ WebGPU inference may be investigated later, but CPU/WASM should be preferred ini
## Site Integration
The extension will initially support only explicitly implemented websites rather than attempting to generically interpret arbitrary web pages.
The extension supports websites through declarative, user-configurable site definitions rather than site-specific code. A definition supplies URL patterns, page markers, post selectors, text selectors, and stable-ID sources. The content script is loaded broadly but exits without examining content unless a definition matches.
Each supported website implements a common post parser interface.
Each active definition is executed by the same generic discovery engine.
Conceptually:
```text
IPostParser
Site definition
|
+-- FacebookPostParser
+-- TwitterPostParser
+-- RedditPostParser
+-- Generic discovery engine
```
A parser is responsible for:
A definition is responsible for declaring:
* Detecting posts and comments.
* Extracting their textual content.
* Providing a stable or locally generated identifier.
* Maintaining a reference to the associated DOM element.
* Where posts and comments appear.
* Which rendered text should be extracted.
* Which attributes or links provide stable identifiers.
A normalized post might resemble:
@ -348,6 +345,6 @@ Filtering policy
Page presentation
```
Site parsers should not contain ML logic. The inference backend should not understand individual websites. The classifier should only determine toxicity probability, while filtering policy determines whether that probability warrants hiding content.
Site definitions and their discovery engine should not contain ML logic. The inference backend should not understand individual websites. The classifier should only determine toxicity probability, while filtering policy determines whether that probability warrants hiding content.
This separation should allow website support, ML implementation, and user-facing filtering behavior to evolve independently.