Headline Changer Browser Extension
AI-powered browser extension that rewrites misleading headlines with accurate, factual titles in real-time.
Features
- Smart Aggressive Mode: Rewrites visible headlines immediately, lazy loads the rest as you scroll
- 24-hour Cache: Remembers rewrites so you don't reprocess the same headlines
- Multiple LLM Providers: Supports Ollama (local), OpenAI, and Anthropic
- Click to Toggle: Click any rewritten headline to see the original
- Minimal UI: Small green checkmark indicates rewritten headlines
How It Works
- You visit a news site (CNN, Fox News, NYT, etc.)
- Extension finds headlines in your viewport
- Scrapes article content from the page
- Sends to LLM with prompt to rewrite factually
- Replaces headline in real-time (2-5 seconds with Ollama, <1s with cloud APIs)
- As you scroll, more headlines are rewritten
- Results cached for 24 hours
Installation
Chrome/Edge
- Open
chrome://extensions/ - Enable "Developer mode" (top right)
- Click "Load unpacked"
- Select the
headline-changerfolder - Extension icon appears in toolbar
Firefox
- Open
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Select
manifest.jsonfrom theheadline-changerfolder - Extension loads (temporary until browser restart)
Configuration
Click the extension icon to open settings:
Ollama (Local - Recommended)
- URL:
http://localhost:11434(default) - Model:
llama3.2:3borqwen2.5:3b(recommended for speed) - Pros: Free, private, no API costs
- Cons: Slower (2-5 seconds per headline)
OpenAI
- API Key: Get from platform.openai.com
- Model: gpt-4o-mini (hardcoded)
- Pros: Fast (<1 second), high quality
- Cons: Costs ~$0.01-0.02 per page
Anthropic (Claude)
- API Key: Get from console.anthropic.com
- Model: claude-3-haiku (hardcoded)
- Pros: Fast, good quality
- Cons: Costs similar to OpenAI
Cache Duration
- Default: 24 hours
- Range: 1-168 hours (1 week)
- Stored in browser's local storage
Supported Sites
Currently configured for:
- CNN
- Fox News
- New York Times
- Washington Post
- BBC
- The Guardian
- Reuters
- AP News
- NBC News
- CBS News
To add more sites: Edit manifest.json and add to content_scripts.matches array.
Usage
- Install and configure the extension
- Visit a news site from the supported list
- Headlines rewrite automatically as you browse
- Click a headline to toggle between original and rewritten
- Hover over checkmark to see original in tooltip
Performance
With Ollama (Local)
- First viewport: 10-15 seconds (5-10 headlines)
- Scroll down: 10-15 seconds per viewport
- Revisit same site: Instant (cached)
- No API costs
With Cloud API
- First viewport: 2-3 seconds
- Scroll down: 2-3 seconds per viewport
- Revisit same site: Instant (cached)
- Cost: ~$0.01-0.02 per page
Privacy
- All processing happens client-side or via your chosen API
- No data sent to third parties (except your chosen LLM provider)
- Cache stored locally in browser
- You control which LLM service to use
Troubleshooting
Headlines not rewriting
- Check extension is enabled (click icon, verify checkbox)
- Verify you're on a supported site
- Check browser console for errors (F12 → Console)
- For Ollama: Verify it's running (
curl http://localhost:11434)
Ollama connection errors
- Make sure Ollama is running
- Check URL in settings (default:
http://localhost:11434) - Verify model is installed:
ollama list - Pull model if needed:
ollama pull llama3.2:3b
Slow performance
- Use cloud API instead of Ollama for speed
- Reduce cache duration to free up storage
- Use smaller Ollama model (llama3.2:1b)
API errors
- Verify API key is correct
- Check you have credits/quota remaining
- Check browser console for specific error messages
Development
File Structure
headline-changer/
├── manifest.json # Extension config
├── content.js # Runs on pages, finds/replaces headlines
├── background.js # Handles LLM API calls
├── popup.html/js # Settings UI
├── styles.css # Minimal styling
└── icons/ # Extension icons (need to create)
Testing
- Make changes to code
- Go to
chrome://extensions/ - Click reload icon on Headline Changer card
- Refresh any open news site tabs
- Check browser console for errors
Adding New Sites
Edit manifest.json:
"matches": [
"*://*.cnn.com/*",
"*://*.yournewsite.com/*"
]
Customizing Prompts
Edit content.js, find rewriteHeadline() method and modify the prompt template.
TODO / Future Improvements
License
MIT - Do whatever you want with it
Credits
Built by Kiro for John's Book of John project, 2026-01-21