A Chrome browser extension that enhances T3 Chat with audio notifications and dynamic favicon indicators when streaming completes.
- 🎵 Audio Notifications: Plays a chime sound when streaming completes
- 🎚️ Volume Control: Adjustable notification volume (0-10) with persistent settings
- 🔛 Enable/Disable Toggle: Quickly turn the extension on or off
- 🟡 Favicon Indicators:
- Yellow dot appears when streaming is active
- Green dot appears when streaming completes
- Automatically restores original favicon after 3 seconds
- 🖥️ Terminal-Themed Popup: Clean, minimal interface
-
Build the Popup (Required before loading extension):
- Navigate to the
popupdirectory:cd popup - Install dependencies:
pnpm install - Build the popup:
pnpm build - This will create the built files in
dist/popup/
- Navigate to the
-
Load Extension in Chrome:
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select this
EnhanceChatdirectory
- Open Chrome and navigate to
The extension popup features a clean, terminal-themed interface with:
- Volume Slider: Control notification volume from 0 to 10 (default: 5)
- Enable/Disable Switch: Toggle the extension on or off
- Settings Persistence: All settings are automatically saved and persist across sessions
Settings are stored using Chrome's storage.local API and sync across all tabs.
The extension uses two methods to detect streaming status:
-
Primary Method: Monitors the send/stop button state
- Detects when a stop button appears (indicates streaming)
- Detects when send button is disabled while input has text
-
Fallback Method: Monitors WebSocket connections
- Watches for WebSocket open/close events
- Analyzes message content for streaming indicators
- Automatically loads T3 Chat's existing favicon - No need to download it manually!
- Dynamically overlays colored dots on the existing T3 Chat favicon using HTML5 Canvas
- Uses
fetch()API to reliably load the favicon (handles CORS issues) - Preserves the original favicon URL for perfect restoration
- Updates occur in real-time as streaming state changes
- Plays when streaming transitions from active to complete
- Uses the notification sound file from the
assets/directory - Volume controlled via popup slider (0-10)
- Fallback support for both MP3 and WAV formats
EnhanceChat/
├── manifest.json # Extension manifest (Manifest V3)
├── background.js # Service worker for notifications
├── content.js # Content script for monitoring and favicon updates
├── popup/ # Vite React app for the extension popup
│ ├── src/
│ │ ├── App.tsx # Main popup component
│ │ ├── components/
│ │ │ ├── DebugPanel.tsx # Debug tools (for development)
│ │ │ └── ui/ # shadcn/ui components
│ │ └── index.css # Terminal-themed styles
│ ├── dist/ # Built popup files (generated after build)
│ └── package.json # Popup dependencies
├── dist/popup/ # Built popup output (created after build)
├── utils/
│ └── favicon.js # Favicon overlay utilities (reference)
├── assets/
│ ├── notification.mp3 # Notification sound (add your own)
│ ├── icons/
│ │ ├── icon16.png # Extension icon 16x16
│ │ ├── icon48.png # Extension icon 48x48
│ │ ├── icon128.png # Extension icon 128x128
│ │ └── generate-icons.html # Icon generator tool
│ └── README.md # Assets information
└── README.md # This file
Replace assets/notification.mp3 with your preferred sound file. Supported formats: MP3, WAV.
Use the volume slider in the popup (0-10). Settings are automatically saved.
Edit the color values in content.js:
- Yellow dot: Line ~215:
ctx.fillStyle = color === 'yellow' ? '#FFC107' : '#4CAF50'; - Green dot: Same line, second color value
If T3 Chat's button selectors change, update the selectors in content.js (around line 75-80):
const sendButton = document.querySelector('button[type="submit"], ...');
const stopButton = document.querySelector('button[aria-label*="stop" i], ...');The popup uses a terminal-themed dark mode. To customize:
- Edit
popup/src/index.cssto modify colors and styling - Colors use OKLCH color space for better consistency
- Theme variables are defined in the
:rootselector
Currently supports Chrome/Chromium (Manifest V3). Firefox support can be added later with a Manifest V2 version.
- No notification sound: Ensure
assets/notification.mp3orassets/notification.wavexists - Volume not working: Check that the volume slider is set above 0 in the popup
- Favicon not updating: Check browser console for CORS errors (may need to adjust favicon loading)
- Not detecting streaming: Inspect T3 Chat's DOM and update button selectors in
content.js - Popup not showing: Make sure you've built the popup (
cd popup && pnpm build)
The popup is built with Vite + React + Tailwind CSS v4 + shadcn/ui. To build it:
cd popup
pnpm install # First time only
pnpm buildAfter building, reload the extension in Chrome to see the changes.
- Make changes to the popup in
popup/src/ - Run
pnpm buildfrom thepopupdirectory - Reload the extension in Chrome (
chrome://extensions/→ click reload)
To add new shadcn/ui components:
cd popup
pnpm dlx shadcn@latest add [component-name]For example:
pnpm dlx shadcn@latest add dialogA debug panel component is available at popup/src/components/DebugPanel.tsx for testing and development. It includes:
- Sound testing
- Favicon state manipulation
- Extension status checking
To use it, import and render <DebugPanel /> in your component.
- Vite: Build tool and dev server
- React 19: UI framework
- TypeScript: Type safety
- Tailwind CSS v4: Utility-first CSS with OKLCH colors
- shadcn/ui: Accessible component library
- Configurable notification sounds
- User preferences/options page
- Firefox support
- More robust streaming detection
- Custom notification sound selection
This is a personal project for enhancing T3 Chat experience.