ChatGPT Response Complete Notifier
Sends a browser notification with text preview when ChatGPT finishes a response. Robustly handles 'New Chat' detection and prevents notification spam.
Features
- 📢 Desktop Notifications: Get notified when ChatGPT finishes generating a response
- 📝 Text Preview: Shows the first 150 characters of the response in the notification
- 🔄 Smart Detection: Automatically detects streaming start/end and "New Chat" events
- 🛡️ No Spam: Built-in cooldown prevents duplicate notifications
- 🔧 Tampermonkey Compatible: Works with Tampermonkey and other userscript managers
Installation
Prerequisites
- Install Tampermonkey or a compatible userscript manager for your browser
Quick Install (Recommended)
Click the link below to install directly:
🚀 Install Script
Note: When you click the link, Tampermonkey (or your userscript manager) should automatically detect the script and prompt you to install it. If not, follow the manual steps below.
Manual Installation
- Download the
chatgpt-response-complete-notifier.user.js file from this repository
- In Tampermonkey, click the "+" icon to create a new script
- Delete the default template code
- Paste the contents of
chatgpt-response-complete-notifier.user.js
- Save the script (Ctrl+S or File > Save)
- Visit https://chatgpt.com and grant notification permissions when prompted
Usage
- Navigate to chatgpt.com
- Start a chat and send a message
- When the response completes, you'll receive a desktop notification with a preview of the response
- Click the notification to focus the ChatGPT tab
Testing
To test the notification manually, open the browser console and run:
testCRNNotification()
Note: This function is exposed via unsafeWindow in Tampermonkey, which allows it to be called from the browser console. If testing doesn't work, ensure the script is running by checking Tampermonkey's icon status.
Configuration
You can modify the configuration in the source code:
const CONFIG = {
DEBUG_MODE: false, // Enable debug logging
NOTIFICATION_COOLDOWN: 3000, // Minimum time between notifications (ms)
PERMISSION_KEY: 'crn_notification_permission_granted',
POLL_INTERVAL: 500 // Check interval (ms)
};
How It Works
- Button State Monitoring: The script monitors ChatGPT's send/stop button state changes
- Detection Logic:
- When the "Stop streaming" button appears → Streaming started
- When the "Send prompt" button becomes disabled → Response completed
- When URL changes → New Chat detected (resets state)
- Notification: Shows a native notification with response preview
- Cooldown: Prevents duplicate notifications within the cooldown period
Browser Compatibility
- ✅ Chrome/Chromium (with Tampermonkey)
- ✅ Firefox (with Tampermonkey)
- ✅ Edge (with Tampermonkey)
- ✅ Safari (with Tampermonkey or compatible userscript manager)
Troubleshooting
Notifications not appearing:
- Check your browser's notification permissions for chatgpt.com
- Ensure Tampermonkey is enabled and the script is running
- Try manually testing with
testCRNNotification() in the console
- Check system Do Not Disturb (DND) mode: If your OS has DND or Focus Assist enabled, notifications may be suppressed. Disable it temporarily to test:
- Windows: Check Focus Assist in Settings > System > Focus assist
- macOS: Check Do Not Disturb in Control Center or System Settings
- Linux: Check your notification settings (varies by distro)
- Check browser notification settings for "Allow notifications"
Multiple notifications:
- The script includes a 3-second cooldown by default
- If you still see duplicates, increase
NOTIFICATION_COOLDOWN in the configuration
Script not working after ChatGPT UI updates:
- The script uses multiple selectors for button detection
- If issues persist, open an issue with details
License
See LICENSE file for details.