Note: This is an enhanced fork of the Open WebUI Extension with additional security features and improvements. All credit goes to the amazing Open WebUI team for building this incredible ecosystem!
A Chrome extension that provides quick access to Open WebUI with a spotlight-style search interface. Select text on any webpage and get AI-powered responses directly in your input fields, or open searches in Open WebUI.
This extension is built on top of the excellent work by the Open WebUI project. Open WebUI is an extensible, feature-rich, and user-friendly self-hosted WebUI designed to operate entirely offline. It supports various LLM runners, including Ollama, OpenAI, and more.
Original Project: open-webui/extension
Open WebUI: open-webui/open-webui
Main Developer: Tim J. Baek - Original extension developer
This fork includes several security and feature enhancements:
- API Key Encryption: API keys are encrypted using AES-256-GCM before storage, providing an additional layer of security beyond Chrome's built-in storage encryption
- Rate Limiting: Implemented sensible rate limits to prevent API abuse:
- Chat completions: 10 requests per minute
- Model fetching: 5 requests per minute
- General API calls: 20 requests per minute
- SSRF Protection: URL validation prevents Server-Side Request Forgery attacks
- Input Validation & Sanitization: All user inputs are validated and sanitized before being sent to APIs
- Content Security Policy (CSP): CSP configured and validated for secure content loading
- Message Action Validation: Strict validation of all messages between content scripts and background worker
- Comprehensive Security Documentation: See SECURITY.md for detailed security information
- Conversation History: Full conversation history with context preservation for multi-turn interactions
- Follow-up Questions: Ask follow-up questions directly in the response popup without starting a new conversation
- Response Popup: Dedicated popup modal for AI responses with streaming display
- Copy Conversation: One-click copy of entire conversation history
- Explain This: Right-click on selected text to get AI-powered explanations with definitions, examples, and related concepts
- Summarize Page: Right-click on any page to get an AI-generated summary of the page content
- Improved Error Handling: User-friendly error messages, especially for rate limit violations
- Better UX: Auto-focus on input fields, improved keyboard shortcuts, and smoother interactions
- Better Error Recovery: Graceful handling of extension context invalidation
- Improved DOM Timing: Better handling of DOM readiness for content script injection
- Enhanced Keyboard Shortcuts: More reliable shortcut handling using Chrome's Commands API
- Streaming Response Improvements: Better handling of streaming AI responses with proper cleanup
For a complete list of security features and implementation details, see SECURITY.md.
- Spotlight Search: Press
Cmd/Ctrl + Space + Shiftto open a quick search interface - Text Selection: Automatically captures selected text when opening the search
- Direct AI Responses: Use
Cmd/Ctrl + Enter + Shiftto get AI responses written directly into active input/textarea fields - Open WebUI Integration: Seamlessly connects to your Open WebUI instance
- Model Selection: Choose from available models in your Open WebUI setup
- Streaming Responses: Real-time streaming of AI responses
- Conversation History: Maintains full conversation context across multiple interactions
- Follow-up Questions: Ask follow-up questions in the response popup
- Response Popup: Dedicated modal for viewing AI responses with conversation history
- Explain This: Context menu option to explain selected text with AI-powered explanations
- Summarize Page: Context menu option to summarize entire web pages
- Encrypted Storage: API keys encrypted with AES-256-GCM
- Rate Limiting: Protection against API abuse
- Enhanced Security: Multiple layers of security validation and protection
- Node.js (v16 or higher) and npm
- Chrome/Chromium-based browser (Manifest V3 compatible)
- Open WebUI instance with API access
git clone <repository-url>
cd extensionNavigate to the extension directory and install the required packages:
cd extension
npm installBuild the Svelte application:
npm run buildThis will create the production build in extension/dist/ directory with:
main.js- The compiled JavaScript bundlestyle.css- The compiled CSS styles
- Open Chrome and navigate to
chrome://extensions/ - Enable Developer mode (toggle in the top-right corner)
- Click Load unpacked
- Select the root
extensiondirectory (the one containingmanifest.json) - The extension should now appear in your extensions list
- Open the extension: Press
Cmd/Ctrl + Space + Shifton any webpage - Enter your Open WebUI URL:
- Example:
http://localhost:8080orhttps://your-open-webui-instance.com - Do not include a trailing slash
- Example:
- Enter your API Key: Your Open WebUI API key
- Fetch Models: Click the refresh icon next to the API key field to load available models
- Select a Model: Choose your preferred model from the dropdown
- Save: Click the checkmark to save your configuration
To reset your configuration:
- Press
Cmd/Ctrl + Space + Shiftto open the search - Press
Shift + Escapewhile the search is open - This will clear all stored settings and show the configuration screen again
- Keyboard Shortcut:
Cmd/Ctrl + Space + Shift - The search interface will appear as an overlay on the current page
- If you have text selected, it will automatically populate the search field
- Open the search interface (
Cmd/Ctrl + Space + Shift) - Type your query (or use selected text)
- Press
Enterto open the search in a new Open WebUI tab
- Select text on any webpage
- Press
Cmd/Ctrl + Enter + Shift - A popup will appear showing the streaming AI response
- Ask Follow-up Questions: Type a follow-up question in the input field at the bottom of the popup
- Press
Enteror click "Send" to continue the conversation - The conversation history is maintained, so the AI has full context
- Press
Escapeto close the popup
Note: The response can also be written directly to active input/textarea fields if one is focused.
The extension adds two context menu options under "OpenWebUI Extension":
- Select text on any webpage that you want explained
- Right-click on the selected text
- Choose "Explain This" from the context menu
- A popup will appear with an AI-powered explanation that includes:
- Clear definitions and explanations
- Examples to illustrate concepts
- Related ideas and concepts
- Background information and context
- You can ask follow-up questions in the popup
- Press
Escapeto close the popup
Note: "Explain This" only appears when text is selected.
- Right-click anywhere on a webpage (no text selection needed)
- Choose "Summarize Page" from the context menu
- The extension will extract the main content from the page
- A popup will appear with an AI-generated summary
- You can ask follow-up questions about the summary
- Press
Escapeto close the popup
Note: The summarization focuses on main content and ignores navigation, ads, footers, and other non-content elements.
- Press
Escapeto close the search interface or response popup - Click outside the modal to close it
extension/
├── manifest.json # Chrome extension manifest
├── background.js # Service worker for extension
├── content.js # Content script injected into web pages
├── images/ # Extension icons
└── extension/ # Svelte application
├── src/
│ ├── App.svelte # Main application component
│ ├── main.ts # Application entry point
│ └── lib/
│ ├── components/ # Svelte components
│ ├── apis/ # API integration
│ └── utils/ # Utility functions
├── dist/ # Build output (generated)
└── package.json # Dependencies and scripts
- Make changes to files in
extension/src/ - Build the extension:
cd extension npm run build - Reload the extension in Chrome:
- Go to
chrome://extensions/ - Click the refresh icon on the extension card
- Go to
- Test your changes on a webpage
In the extension/ directory:
npm run dev- Start Vite development server (for testing outside extension context)npm run build- Build for productionnpm run preview- Preview production buildnpm run check- Run Svelte type checking
- After building, always reload the extension in Chrome to see changes
- Check the browser console for any errors
- The extension uses Chrome Storage API for configuration persistence
- Content scripts are injected into all pages (
<all_urls>)
- Ensure you've built the extension (
npm run buildin theextension/directory) - Check that
extension/dist/main.jsandextension/dist/style.cssexist - Verify you're loading the correct directory (the one with
manifest.json)
- Verify your Open WebUI URL is correct and accessible
- Check that your API key is valid
- Ensure CORS is properly configured on your Open WebUI instance
- Check the browser console for specific error messages
- Some websites may intercept keyboard shortcuts
- Try on a different page or website
- Ensure no other extensions are conflicting with the shortcuts
- Verify your API key has the correct permissions
- Check that your Open WebUI instance is running and accessible
- Ensure the
/api/modelsendpoint is available
- Chrome 88+ (Manifest V3 support required)
- Edge 88+ (Chromium-based)
- Other Chromium-based browsers with Manifest V3 support
The extension requires the following permissions:
storage- To save your Open WebUI configurationscripting- To interact with web pages and inject contenthost_permissions: <all_urls>- To work on all websites- Content scripts on all URLs - To provide the search interface
This fork includes comprehensive security enhancements. For detailed security information, see SECURITY.md.
Key Security Features:
- ✅ AES-256-GCM encryption for API keys
- ✅ Rate limiting to prevent abuse
- ✅ SSRF protection via URL validation
- ✅ Input sanitization and validation
- ✅ Content Security Policy (CSP)
- ✅ Message action validation
Copyright (c) 2023-2025 Timothy Jaeryang Baek (Open WebUI)
This project is licensed under the same terms as the original Open WebUI Extension. See LICENSE for full license details.
Important: This license requires maintaining "Open WebUI" branding in all distributions. The extension name, descriptions, and user-facing text preserve the Open WebUI branding as required by the license terms.
This is a fork with enhancements. If you'd like to contribute:
- To this fork: Feel free to open issues or pull requests here
- To the original project: Consider contributing to open-webui/extension for features that benefit everyone
- To Open WebUI: Check out open-webui/open-webui for the main project
This fork focuses on:
- Security: Enhanced encryption, validation, and protection mechanisms
- User Experience: Conversation history, follow-up questions, and improved UI
- Reliability: Better error handling and recovery mechanisms
If you prefer the original version without these enhancements, check out the original extension.
