A browser extension that intelligently merges the content of a linked page with the current page using AI.
Features
- Smart Content Merging: Uses AI to seamlessly integrate linked content into the current page while preserving context
- Multiple AI Provider Support: Choose from OpenAI, Anthropic (Claude), Google (Gemini), or custom endpoints
- Easy Configuration: User-friendly options page to manage multiple API providers
- Visual Feedback: Loading indicators and notifications keep you informed during the merge process
- Keyboard Shortcuts: Simply hold Shift or Ctrl/Cmd and click a link to merge its content
How It Works
- Hold the Shift or Ctrl/Cmd key
- Click any link on the current page
- The extension fetches the linked page's content
- AI intelligently merges the content into the current page
- The merged content appears in place, maintaining the original link
Setup
1. Install the Extension
Load the extension in your browser:
- Chrome/Edge: Navigate to
chrome://extensions, enable "Developer mode", and load thepackages/mergedirectory - Firefox: Navigate to
about:debugging#/runtime/this-firefoxand load themanifest.jsonfile
2. Configure an AI Provider
Click the extension icon and select "Options" (or right-click the extension icon → Options).
Supported Providers
OpenAI
- Get an API key from OpenAI Platform
- Select "OpenAI" as provider type
- Enter your API key
- Choose a model:
gpt-5orgpt-5-nano - Test the connection and save
Anthropic (Claude)
- Get an API key from Anthropic Console
- Select "Anthropic (Claude)" as provider type
- Enter your API key
- Choose model:
claude-4-5-sonnet - Test the connection and save
Google (Gemini)
- Get an API key from Google AI Studio
- Select "Google (Gemini)" as provider type
- Enter your API key
- Choose a model:
gemini-2.5-flash,gemini-2.5-flash-lite, orgemini-2.5-pro - Test the connection and save
Custom Endpoint
For self-hosted models or other OpenAI-compatible APIs:
- Select "Custom Endpoint" as provider type
- Enter your API key
- Enter the base URL (e.g.,
https://api.example.com/v1) - Enter your model name
- Test the connection and save
Supported custom endpoints:
- Azure OpenAI
- Ollama (running locally)
- LM Studio
- Any OpenAI-compatible API
3. Managing Providers
- Add Multiple Providers: Click "+ Add Provider" to configure additional AI services
- Switch Providers: Double-click any provider in the sidebar to make it active
- Edit Provider: Click on a provider to modify its settings
- Delete Provider: Select a provider and click the "Delete" button
- Test Connection: Verify your API key works before saving
Usage
There are two ways to merge link content:
Method 1: Keyboard Shortcut
- Navigate to any webpage
- Hold Shift or Ctrl/Cmd (Windows/Linux) or ⌘ (Mac)
- Click on any link
- Wait for the loading indicator
- The merged content will replace the original paragraph
Method 2: Right-Click Context Menu
- Navigate to any webpage
- Right-click on any link
- Select "Merge Link Content" from the context menu
- Wait for the loading indicator
- The merged content will replace the original paragraph
Features in Detail
Smart Merging
The AI analyzes both the current page content and the linked page content to create a cohesive merged result that:
- Preserves the original context and flow
- Integrates new information naturally
- Maintains the link for reference
- Returns valid HTML that blends seamlessly
Visual Feedback
- Loading Indicator: Shows "⏳ Merging content..." next to the link
- Success Notification: Green notification confirms successful merge
- Error Notification: Red notification shows detailed error messages
Error Handling
- No provider configured? Get a helpful message to set one up
- Network issues? Clear error messages explain what went wrong
- Invalid API key? Test your connection before saving
Migration from v1.0
If you were using the previous version with a Gemini API key:
- Your API key will be automatically migrated to the new multi-provider system
- The migrated provider will be named "Google Gemini (Migrated)"
- You can edit, rename, or delete it like any other provider
Privacy & Security
Data Privacy
- API keys are stored securely in Chrome's synchronized storage
- Keys are never logged or exposed in the console
- All AI processing happens via your chosen provider's API
- No data is sent to third parties other than your configured AI provider
Security Features
The extension implements comprehensive security measures to protect against malicious content:
- HTML Sanitization: All HTML content from AI providers is sanitized using DOMPurify before insertion
- XSS Prevention: Dangerous tags (
<script>,<iframe>,<embed>,<object>) are encoded to display as text rather than executing - Event Handler Blocking: All JavaScript event handlers (onclick, onerror, etc.) are stripped
- URL Validation: Only safe URL schemes (http, https, mailto) are allowed in links
- Content Size Limits: Maximum 1MB content to prevent denial-of-service attacks
- Graceful Fallback: If content cannot be safely sanitized, it's displayed as plain text
- User Warnings: You'll be notified if potentially dangerous content was detected and encoded
Encoding vs Stripping: When the LLM includes dangerous tags like <script> or <iframe>, they're encoded to HTML entities (e.g., <script>) so they display as visible text instead of being executed. This preserves the LLM's intent when showing examples or documentation while keeping you safe.
The extension uses a whitelist approach - only explicitly safe HTML elements and attributes are allowed through. This provides defense-in-depth protection against XSS attacks and malicious content injection.
Troubleshooting
"No active provider configured"
- Open the options page and configure at least one provider
- Make sure the provider is enabled (checkbox is checked)
- Double-click the provider to make it active
"Connection failed" during test
- Verify your API key is correct
- Check that you have sufficient credits/quota with the provider
- For custom endpoints, ensure the base URL is correct and accessible
Merge not working
- Check browser console for error messages
- Verify you're holding the correct modifier key (Shift or Ctrl/Cmd)
- Ensure the link has a valid parent element
Content not merging properly
- Some complex page structures may not merge well
- Try clicking different links or elements
- Check that the AI provider is responding (test connection in options)
Development
Build the extension:
cd packages/merge
npm install
npm run buildThe built extension will be in the dist/ directory.
Technologies
- TypeScript
- Vercel AI SDK
- Multiple AI provider SDKs (OpenAI, Anthropic, Google)
- Turndown (HTML to Markdown conversion)
- Chrome Extension APIs
Privacy
We take your privacy seriously. The extension:
- Stores your API keys locally in Chrome's secure storage
- Does NOT collect or track any personal information
- Does NOT send data to our servers (we don't have any)
- Only sends content to the AI provider you explicitly configure
For full details, see our Privacy Policy.
License
MIT