Skip to content

dk-d3v/PageMind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PageMind

Firefox Extension License: MIT

An AI-powered Firefox extension that lets you ask questions about any web page, get summaries, and fill forms — all powered by Anthropic Claude.

📸 Screenshot

PageMind in action


Table of Contents

  1. Features
  2. Installation
  3. Setup
  4. Usage
  5. Configuration Reference
  6. Development
  7. Security
  8. Privacy
  9. License

Features

  • 🔍 Ask questions about any web page in natural language
  • 📝 Page summarization — get a quick overview of long articles or documents
  • 📋 Form filling assistance — describe what you want, review AI suggestions, then confirm
  • 🤖 Anthropic Claude integration — powered by Claude Sonnet 4, Opus 4, and Haiku 4
  • 🔗 Custom base URL support — route API calls through your own proxy or gateway
  • 💬 Per-tab conversation history — each browser tab maintains its own chat context

Installation

Prerequisites

Option A — Load as Temporary Extension (Development)

Temporary extensions are removed when Firefox restarts. Use this for testing.

  1. Open Firefox and navigate to about:debugging
  2. Click This Firefox in the left sidebar
  3. Click Load Temporary Add-on…
  4. Browse to the project folder and select src/manifest.json
  5. The extension icon appears in the toolbar

Option B — Load as Permanent Extension (Packed)

  1. Pack the src/ directory into a .zip file, then rename it to .xpi
  2. Open Firefox and navigate to about:addons
  3. Click the ⚙️ gear icon → Install Add-on From File…
  4. Select your .xpi file
  5. Accept the permissions prompt

Note: Unsigned extensions require Firefox Developer Edition or Nightly with xpinstall.signatures.required set to false in about:config.


Setup

1. Get an Anthropic API Key

Visit console.anthropic.com, sign in or create an account, and generate an API key under API Keys.

2. Open Extension Settings

  • Click the PageMind toolbar icon

  • Click the ⚙️ Settings button inside the popup

    or

  • Navigate to about:addons → find PageMind → click Preferences

3. Configure the Extension

Field What to Enter
API Key Paste your Anthropic API key (starts with sk-ant-…)
Model Select a Claude model from the dropdown
Base URL Leave blank for default, or enter your proxy URL

Click Save Settings. A confirmation message confirms the key was stored.


Usage

Asking Questions About a Page

  1. Navigate to any web page
  2. Click the PageMind toolbar icon
  3. Type your question in the input box (e.g., "What is the main topic of this article?")
  4. Press Enter or click Send
  5. The AI response appears in the chat area

Summarizing a Page

In the input box, type a summarization request:

Summarize this page in 3 bullet points.

Form Filling Workflow

PageMind can detect form fields on the page and suggest values.

  1. Navigate to a page with a form
  2. Open the popup and describe what to fill in:
    Fill in the contact form with my name John Doe and email john@example.com
    
  3. The AI analyzes the form and proposes field values
  4. Review the suggestions shown in the popup
  5. Click Confirm & Fill to apply them — or Cancel to discard

⚠️ Form values are never submitted automatically. You always review and confirm before anything is written to the page.

Clearing Conversation History

Click the 🗑 Clear button in the popup to reset the conversation for the current tab. This does not affect other tabs.

Keyboard Shortcuts

Action Shortcut
Send message Enter
New line in input Shift + Enter

Configuration Reference

All settings are saved in Firefox's storage.sync and synced across devices when signed into Firefox Sync.

Setting Required Default Description
apiKey ✅ Yes (empty) Your Anthropic API key
baseUrl No https://api.anthropic.com API endpoint; change for proxy use
model No claude-sonnet-4-20250514 Claude model to use
maxContentLength No 100000 Max characters of page content sent per request
maxConversationPairs No 10 Max message pairs retained in history

Development

Project Structure

firefoxextension/
├── src/
│   ├── manifest.json          # Extension manifest (MV2)
│   ├── background/
│   │   ├── api-client.js      # Anthropic API communication
│   │   └── background.js      # Service worker / message router
│   ├── content/
│   │   ├── content.js         # Page content extraction
│   │   └── form-filler.js     # Form field detection & filling
│   ├── popup/
│   │   ├── popup.html         # Popup markup
│   │   ├── popup.css          # Popup styles
│   │   ├── popup.js           # Popup entry point
│   │   └── popup-ui.js        # UI state management
│   ├── options/
│   │   ├── options.html       # Settings page markup
│   │   ├── options.css        # Settings styles
│   │   └── options.js         # Settings logic
│   ├── shared/
│   │   ├── constants.js       # Global constants & defaults
│   │   ├── message-types.js   # Message type definitions
│   │   ├── storage.js         # Storage abstraction
│   │   └── validators.js      # Input validation helpers
│   └── icons/                 # Extension icons (16/32/48/128px)
├── tests/
│   ├── package.json           # Test dependencies (Jest)
│   ├── setup.js               # Jest global setup
│   ├── load-source.js         # Source loader for IIFE modules
│   ├── background/            # API client tests
│   ├── content/               # Form filler tests
│   ├── popup/                 # Popup UI tests
│   └── shared/                # Shared module tests
├── docs/                      # Architecture, spec, and phase docs
└── scripts/
    └── generate-icons.js      # Icon generation helper

Running Tests

cd tests
npm install
npm test

Tests are written with Jest and cover all shared modules, the API client, form filler, and popup UI logic.

Contributing

See docs/CONTRIBUTING.md for development setup, code style, and the pull request process.


Security

  • API keys are stored using Firefox's encrypted storage.sync API — never in plain text, localStorage, or cookies
  • API calls are made exclusively from the background script — the key is never exposed to content scripts or the page DOM
  • The extension's Content Security Policy (script-src 'self') blocks inline scripts and external script injection
  • Form filling requires explicit user confirmation before any value is written to the page

For a full audit, see docs/security-review.md.


Privacy

When you ask a question, the following data is sent to Anthropic's API:

  • The text content of the current web page (up to maxContentLength characters)
  • Your question and prior conversation history for the current tab

No data is sent to any third party other than Anthropic (or your configured proxy). No browsing history, cookies, or credentials are ever transmitted.

Review Anthropic's Privacy Policy for details on how they handle API data.


License

MIT

About

AI-powered Firefox extension — chat with any webpage, get summaries & fill forms using Anthropic Claude

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors