pagepal-ai

PagePal AI Browser Extension

A Manifest V3 browser extension that allows you to ask questions about webpage content using your own OpenAI API key.

Features

Setup Instructions

1. Get an OpenAI API Key

  1. Visit OpenAI’s API Keys page
  2. Sign up or log in to your OpenAI account
  3. Create a new API key and copy it

2. Install the Extension

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable “Developer mode” (toggle in top right)
  3. Click “Load unpacked” and select the extension directory (the root folder containing manifest.json)
  4. The PagePal AI extension should now appear in your extensions

3. Configure Your API Key

  1. Click the PagePal AI extension icon in your browser toolbar
  2. On first use, you’ll see the settings screen
  3. Paste your OpenAI API key in the input field
  4. Click “Save API Key”

4. Usage

  1. Navigate to any webpage
  2. Click the PagePal AI extension icon
  3. Type a question about the page content
  4. Select your preferred model (GPT-4o Mini is fastest and cheapest)
  5. Click “Ask Question”
  6. View the AI-generated answer

Tip: Click the gear icon (⚙️) in the header to access settings and change your API key.

Project Structure

paigewise-extension/
├── manifest.json          # Extension manifest (Manifest V3)
├── popup.html            # Extension popup interface
├── popup.js              # Frontend logic with OpenAI integration
├── content.js            # Content script for text extraction
└── README.md            # This file

How It Works

  1. Text Extraction: The content script extracts visible text from web pages, excluding navigation, headers, and footers
  2. Local Storage: Your OpenAI API key is stored securely in Chrome’s sync storage
  3. Direct API Calls: The extension calls OpenAI’s API directly from the browser
  4. Smart Caching: Page text is cached for 30 seconds to avoid re-extraction

Privacy & Security

Development Notes

Publishing to Chrome Web Store

To publish this extension:

  1. Add Required Assets:
    • Icons (16x16, 48x48, 128x128 pixels)
    • Screenshots for the store listing
    • Detailed description
  2. Create Privacy Policy (required if handling user data)

  3. Pay $5 Developer Registration Fee (one-time)

  4. Submit for Review (can take 1-7 days)

Next Steps

Troubleshooting

Extension not loading:

API key issues:

Text extraction issues: