Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✍ Proofread — Context Menu Proofreader

A Chrome extension that lets you right-click on selected text and proofread it in different styles using AI — works out-of-the-box with Chrome's Built-in AI (Gemini Nano), no API key needed.

Features

  • Zero-config by default — uses Chrome Built-in AI (Gemini Nano), no sign-up or API keys
  • Right-click context menu with 8 proofread styles:
    • 📝 Formal — professional, polished tone
    • 😊 Friendly — warm, conversational tone
    • 📧 Email — professional email format
    • 😂 Humorous — witty rewrite
    • ✅ Grammar Only — fix errors, keep original tone
    • 💡 Simplify — plain, clear language
    • 🇬🇧 Translate → English + Proofread
    • 🇫🇷 Translate → French + Proofread
  • Floating popup with proofread result, draggable header
  • Copy result to clipboard
  • Replace selected text in editable fields (textarea, input, contenteditable)
  • Try Again button to regenerate with a different variation
  • Auto-detects input language and proofreads in the same language (except translate styles)
  • Dark/light theme follows system preference

AI Providers (Tiered)

The extension uses a tiered approach so non-technical users can get started immediately:

Tier Provider Auth Default Model Notes
Default Chrome Built-in AI None Gemini Nano Zero-config, runs on-device, Chrome 138+
Upgrade Google Gemini Sign in with Google gemini-2.0-flash Better quality, cloud-based
Advanced OpenAI API key gpt-4o Hidden behind "Advanced" toggle
Advanced xAI / Grok API key grok-3 Hidden behind "Advanced" toggle
Advanced Ollama (local) None llama3 Hidden behind "Advanced" toggle

Installation

  1. Clone or download this repository
  2. Open Chrome and go to chrome://extensions/
  3. Enable Developer mode (top-right toggle)
  4. Click Load unpacked and select the proofread-extension/ folder
  5. The ✍ icon appears in your toolbar

Configuration

Right-click the extension icon → Options (or click the ✍ icon)

Chrome Built-in AI (Default)

Works immediately with no setup on Chrome 138+. The options page shows the current status:

  • Ready — model is available on-device
  • Downloading — model is being downloaded (first use)
  • Unavailable — browser/device not supported; switch to a cloud provider

Google Gemini (Upgrade)

  1. Select OpenAI (GPT-4o) as provider
  2. Paste your API key from platform.openai.com/api-keys
  3. Click Save Settings

Google Gemini (Upgrade)

  1. Click ⚙️ Advanced Options to expand
  2. Select Google Gemini as provider
  3. Click Sign in with Google — no API key needed
  4. Click Save Settings

Note: For the Google OAuth to work, you need a Google Cloud project with an OAuth 2.0 client ID (type: Chrome Extension). Set the client ID in manifest.jsonoauth2.client_id. See Google's guide.

OpenAI (Advanced)

  1. Click ⚙️ Advanced Options to expand
  2. Select OpenAI (GPT-4o) as provider
  3. Paste your API key from platform.openai.com/api-keys
  4. Click Save Settings

xAI / Grok (Advanced)

  1. Click ⚙️ Advanced Options to expand
  2. Select xAI (Grok) as provider
  3. Paste your API key from console.x.ai
  4. Click Save Settings

Ollama / Local (Advanced)

  1. Install Ollama and pull a model: ollama pull llama3
  2. Click ⚙️ Advanced Options to expand
  3. Select Ollama (Local) as provider
  4. Set the base URL (default: http://localhost:11434)
  5. Click Save Settings

Usage

  1. Select text on any webpage
  2. Right-click → ✍ Proofread → choose a style
  3. A floating popup appears with the proofread result
  4. Actions:
    • 📋 Copy — copy result to clipboard
    • ✏️ Replace — replace selected text (only in editable fields)
    • 🔄 Try Again — generate a new variation
    • or click outside — close the popup
    • Drag the header to reposition the popup

File Structure

proofread-extension/
├── manifest.json              # Extension manifest (MV3)
├── background/
│   └── service-worker.js      # Context menu + LLM orchestration
├── content/
│   ├── content.js             # Popup overlay rendering
│   └── content.css            # Popup styles
├── lib/
│   ├── llm-providers.js       # LLM provider abstraction + prompts
│   └── google-auth.js         # Google OAuth2 helper
├── options/
│   ├── options.html           # Settings page
│   └── options.js             # Settings logic
├── icons/
│   ├── icon16.png
│   ├── icon48.png
│   └── icon128.png
└── README.md

Security

  • API keys stored in chrome.storage.sync (encrypted at rest by Chrome)
  • Chrome Built-in AI runs entirely on-device — text never leaves the browser
  • LLM responses rendered as plain text (textContent), never innerHTML — XSS-safe
  • No eval() or dynamic code execution
  • Host permissions scoped to only the required API domains
  • Google OAuth tokens managed by Chrome's built-in identity API

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages