A Chrome Manifest V3 browser extension that provides a persistent, right-side panel AI chat experience. Browsersky analyzes the currently active webpage by extracting page context and answering user questions using OpenAI GPT-4.
- Right-side panel chat interface - Persistent side panel that stays open across tab changes
- Page context extraction - Automatically extracts title, URL, and visible text from the current page
- AI-powered answers - Uses GPT-4 to answer questions based on page content
- Clean, modern UI - Beautiful chat interface with message history
- Error handling - Graceful handling of restricted pages, network errors, and edge cases
- Chrome or Edge browser (Manifest V3 compatible)
- Node.js 18+ (for backend server)
- OpenAI API key
- Open Chrome/Edge and navigate to
chrome://extensions/(oredge://extensions/) - Enable "Developer mode" (toggle in top-right corner)
- Click "Load unpacked"
- Select the
Browserskydirectory (the folder containingmanifest.json) - The extension should now appear in your extensions list
-
Navigate to the
backenddirectory:cd backend -
Install dependencies:
npm install
-
Create a
.envfile (copy from.env.example):cp .env.example .env
-
Edit
.envand add your OpenAI API key:OPENAI_API_KEY=your_openai_api_key_here PORT=3001 -
Start the backend server:
npm start
Or for development with auto-reload:
npm run dev
The server should start on
http://localhost:3001
-
Navigate to the
iconsdirectory -
Create or add icon files:
icon16.png(16x16 pixels)icon32.png(32x32 pixels)icon48.png(48x48 pixels)icon128.png(128x128 pixels)
You can use the
create-placeholder-icons.htmlfile in the icons directory to generate simple placeholder icons, or use your own Browsersky branding.
- Make sure the backend server is running
- Navigate to any webpage (e.g., a news article or blog post)
- Click the Browsersky icon in your browser toolbar
- The side panel should open on the right
- Try asking a question like "Summarize this page"
cd backend
npm install
npm start # or npm run dev for auto-reload- Make your changes to the extension files
- Go to
chrome://extensions/ - Click the refresh icon on the Browsersky extension card
- Test your changes
- Service Worker: Go to
chrome://extensions/, find Browsersky, click "service worker" link - Side Panel: Right-click in the side panel → "Inspect"
- Content Script: Open DevTools on the webpage, check Console tab
- Backend: Check terminal output and
http://localhost:3001/health
The default backend endpoint is http://localhost:3001/api/chat. To change it, edit the CONFIG.backendEndpoint in service_worker.js.
Default model is gpt-4o with fallback to gpt-4o-mini. Configure in:
- Backend: Set
DEFAULT_MODELandFALLBACK_MODELin.env - Service Worker: Edit
CONFIG.defaultModelandCONFIG.fallbackModel
- Maximum text length: 50,000 characters (configurable in
content.js) - Minimum text length: 100 characters (for meaningful context)
Default timeout is 30 seconds. Configure in service_worker.js → CONFIG.requestTimeout.
- Restricted Pages: Cannot extract content from
chrome://,chrome-extension://, or browser settings pages - Heavily Client-Rendered Content: Some SPAs may have limited extractable text on initial load
- Image-Only Pages: Pages with mostly images and minimal text will show an insufficient text error
- No Persistent Memory: Chat history is only stored in-memory (cleared on panel close)
- Single Tab Context: Only analyzes the currently active tab
- Check that
manifest.jsonis valid JSON - Ensure all required files exist (service_worker.js, content.js, sidepanel.html, etc.)
- Check browser console for errors
- Verify the extension is enabled in
chrome://extensions/ - Check service worker for errors (click "service worker" link)
- Try reloading the extension
- Verify backend server is running (
http://localhost:3001/health) - Check that
OPENAI_API_KEYis set correctly in.env - Check backend server logs for errors
- Verify network connectivity
- This is expected for restricted pages (chrome://, chrome-extension://)
- Try navigating to a regular webpage (http:// or https://)
- Check backend server logs
- Verify OpenAI API key is valid
- Check for rate limits or API errors
- Ensure backend endpoint URL matches in
service_worker.js
Test the extension on various websites:
- News Articles: Try summarizing articles from news sites
- Documentation: Ask questions about technical documentation
- Blog Posts: Extract key points from blog content
- Wikipedia: Test on information-dense pages
- Restricted Pages: Verify error handling on
chrome://extensions/
Browsersky/
├── manifest.json # Extension manifest
├── service_worker.js # Background orchestrator
├── content.js # Page context extractor
├── sidepanel.html # Side panel UI
├── sidepanel.js # Side panel logic
├── sidepanel.css # Side panel styles
├── icons/ # Extension icons
│ ├── icon16.png
│ ├── icon32.png
│ ├── icon48.png
│ ├── icon128.png
│ └── create-placeholder-icons.html
├── backend/ # Backend proxy server
│ ├── server.js
│ ├── package.json
│ └── .env
├── README.md # This file
└── docs/
└── ARCHITECTURE.md # Technical documentation
MIT
For issues, questions, or contributions, please refer to the project documentation in docs/ARCHITECTURE.md.