34 lines
1.5 KiB
Markdown
34 lines
1.5 KiB
Markdown
# Forage Chrome Extension
|
|
|
|
Automatically captures browsing signals for your Forage personalized feed without needing to manually inject JavaScript.
|
|
|
|
## Install (3 steps)
|
|
|
|
1. Open Chrome and navigate to `chrome://extensions`
|
|
2. Enable **Developer mode** (toggle in the top-right corner)
|
|
3. Click **Load unpacked** and select the `applications/forage/extension/` directory
|
|
|
|
The Forage icon will appear in your toolbar. Click it to configure the server URL, user ID, and optional auth token.
|
|
|
|
## How it works
|
|
|
|
- **Content script** runs on every page at `document_idle`, reads the page title, URL, canonical URL, description, and word count, then sends a capture message to the background worker.
|
|
- **Background worker** POSTs to `/capture` (registering the page as a Forage item and firing a view signal) and `/signal` (for dwell events after 30 seconds).
|
|
- **Popup** lets you configure the server URL, user ID, auth token, and enable/disable capture. Shows the last captured page title.
|
|
|
|
## Configuration
|
|
|
|
| Field | Default | Description |
|
|
|-------|---------|-------------|
|
|
| Server URL | `http://localhost:4242` | Forage server address |
|
|
| User ID | `1` | Which Forage user to signal as |
|
|
| Token | _(empty)_ | Bearer token if the server was started with `--token` |
|
|
| Enable capture | ✓ | Toggle to pause/resume without uninstalling |
|
|
|
|
## Skipped pages
|
|
|
|
The extension never captures:
|
|
- `chrome://` internal pages
|
|
- `localhost` and `127.0.0.1` addresses (avoids capturing the Forage UI itself)
|
|
- Extension pages (`chrome-extension://`, `moz-extension://`)
|