A powerful Chrome extension for blocking specific websites from Google search results, enhancing your search experience.
- 🚫 Smart Blocking: Automatically block search results from specified domains
- 🎯 Intelligent Matching: Auto-generate regex patterns to match main domains and all subdomains
- 🎨 Multiple Blocking Modes: Support for complete hide, dim display, and replace notification modes
- 📊 Statistical Analysis: Real-time blocking statistics to understand blocking effectiveness
- ⚙️ Flexible Configuration: Customize blocking lists with personalized settings
- 💾 Data Synchronization: Use Chrome sync storage for consistent data across devices
- 🔄 Real-time Updates: Dynamic page monitoring with infinite scroll support
- 🎯 Right-click Shortcuts: Quick add to blocking list via right-click on links
- 📱 Responsive UI: Modern interface design supporting various screen sizes
- 🌍 Multi-domain Support: Support for Google search domains worldwide
pnpm installpnpm devpnpm buildpnpm package- Run
pnpm buildto build the extension - Open Chrome browser and go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked extension"
- Select the
build/chrome-mv3-prodfolder
- Enable Extension: Click the extension icon and ensure the toggle is on
- Add Blocked Websites: Enter the domain to block in the popup (e.g., csdn.net), click "Add"
- Smart Matching: The system automatically generates regex patterns to match the domain and all subdomains
- Search Testing: Search on Google, blocked websites will display according to the set mode
- Right-click Blocking: Right-click links on search result pages and select "Block this domain"
- Bulk Management: Manage all blocked websites in the settings page
- Data Import/Export: Backup and restore your settings
- Statistics View: View blocking effectiveness statistics
- Complete Hide: Completely remove blocked search results
- Dim Display: Keep results but reduce opacity and saturation
- Replace Notification: Replace original content with blocking notification
- Show Notifications: Display notifications when blocking websites
- Statistics Data: View and clear blocking statistics
- Data Management: Import/export settings, reset configuration
Run test scripts in browser console:
// Load test script
const script = document.createElement('script');
script.src = chrome.runtime.getURL('test-extension.js');
document.head.appendChild(script);
// Run all tests
ZearchTests.runAllTests();-
Functionality Testing:
- Add/remove blocked websites
- Switch blocking modes
- Verify statistics data
-
Compatibility Testing:
- Different Google domains (google.com, google.co.uk, etc.)
- Various search result types
- Dynamic loading content
-
Performance Testing:
- Large search result pages
- Frequent scroll loading
- Multiple tabs simultaneous use
- Content Script (
src/contents/block-site.ts): Main blocking logic - Popup (
src/popup.tsx): Extension popup interface - Options (
src/options.tsx): Settings page - Background (
src/background.ts): Background service - Storage (
src/utils/storage.ts): Data storage management
- Framework: React + TypeScript
- Build Tool: Plasmo
- Styling: Tailwind CSS
- Storage: Chrome Storage API
- Permissions: tabs, storage, contextMenus, notifications, scripting
- Debounce Processing: Avoid frequent execution of blocking logic
- Selector Optimization: Use efficient DOM selectors
- Memory Management: Timely cleanup of event listeners
- Asynchronous Processing: Non-blocking data storage operations
src/
├── contents/ # Content scripts
│ └── block-site.ts
├── utils/ # Utility functions
│ └── storage.ts
├── popup.tsx # Popup component
├── options.tsx # Settings page
└── background.ts # Background script
- Add UI in corresponding components
- Add data structures in storage.ts
- Implement logic in content script
- Update permission configuration
-
Extension Not Working:
- Check if extension is enabled
- Confirm you're on Google search page
- Check console for error messages
-
Blocking Not Effective:
- Verify domain format is correct
- Check blocking mode settings
- Refresh page and retry
-
Data Loss:
- Check Chrome sync settings
- Try importing backup data
- Reinstall extension
- Use Chrome Developer Tools
- Check extension management page for errors
- Run test scripts in console
- ✨ Initial release
- 🚫 Basic blocking functionality
- 🎨 Multiple blocking modes
- 📊 Statistics feature
- ⚙️ Settings page
Issues and Pull Requests are welcome!
MIT License
Andy - Developer focused on improving search experience