A powerful, privacy-focused ad blocking browser extension built with Manifest V3
Features • Installation • Building • Testing • Customization • Contributing
- YouTube Ad Blocking: Blocks video ads, overlays, banners, sponsored content, and skippable/non-skippable pre-rolls
- Universal Blocking: Works on all websites including news sites, social media, and sites with Google AdSense
- 500+ Ad Domains: Comprehensive blocklist covering all major ad networks
- DeclarativeNetRequest: Uses Manifest V3's efficient network blocking API
- < 50ms Overhead: Optimized for minimal performance impact
- Debounced Observers: Smart MutationObserver implementation prevents CPU spikes
- Memory Efficient: Uses WeakSet for element tracking to prevent memory leaks
- No Data Collection: All processing happens locally
- No Telemetry: No analytics, tracking pixels, or user profiling
- Local-First Operation: Blocking and detection run on-device (optional rule updates can be fetched when auto-update is enabled)
- On-Device ML: Optional TensorFlow.js-based ad detection runs entirely in your browser
| Feature | Description |
|---|---|
| Video Ad Blocking | Skips YouTube video ads automatically |
| Banner Ad Blocking | Removes banner ads across all sites |
| Popup Blocking | Prevents popup and overlay ads |
| Anti-Adblock Bypass | Defeats adblock detection scripts |
| Custom Rules | Add your own CSS selectors per site |
| Whitelist | Disable blocking on specific sites |
| Statistics | Track blocked ads and saved time |
| Dark Mode | Full dark theme support |
| Import/Export | Backup and restore settings |
Coming soon
Coming soon
-
Download or clone this repository:
git clone https://github.com/Edmon02/adeclipse.git cd adeclipse -
Open Chrome and navigate to
chrome://extensions/ -
Enable "Developer mode" (toggle in top-right corner)
-
Click "Load unpacked" and select the
AdEclipsefolder -
The extension is now installed and active!
-
Download or clone this repository
-
Open Firefox and navigate to
about:debugging#/runtime/this-firefox -
Click "Load Temporary Add-on"
-
Navigate to the
AdEclipsefolder and selectmanifest.json
Note: Temporary add-ons in Firefox are removed when the browser closes. For permanent installation, the extension must be signed by Mozilla.
- Node.js 18+ and npm
- (Optional) A code editor like VS Code
# Clone the repository
git clone https://github.com/Edmon02/adeclipse.git
cd adeclipse
# Install dependencies
npm install
# Run tests
npm test
# Watch mode for development
npm run test:watchAdEclipse/
├── manifest.json # Extension manifest (MV3)
├── rules/
│ ├── ad-domains.json # 500+ blocked ad domains
│ ├── declarative_rules.json # Network blocking rules
│ └── site-selectors.json # Per-site CSS selectors
├── src/
│ ├── background/
│ │ ├── background.js # Service worker
│ │ ├── storage.js # Settings management
│ │ ├── stats.js # Statistics tracking
│ │ └── rules.js # Dynamic rules
│ ├── content/
│ │ ├── youtube.js # YouTube-specific blocking
│ │ ├── youtube.css # YouTube ad hiding styles
│ │ ├── general.js # General site blocking
│ │ ├── general.css # General ad hiding styles
│ │ └── anti-adblock.js # Adblock detection bypass
│ ├── popup/
│ │ ├── popup.html # Popup interface
│ │ ├── popup.css # Popup styles
│ │ └── popup.js # Popup logic
│ ├── options/
│ │ ├── options.html # Settings page
│ │ ├── options.css # Settings styles
│ │ └── options.js # Settings logic
│ └── ml/
│ ├── detector.js # ML-based ad detection
│ └── features.js # Feature extraction
├── icons/
│ └── *.png # Extension icons
└── tests/
├── setup.js # Jest setup
└── unit/ # Unit tests
# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Watch mode
npm run test:watch
# Run specific test file
npm test -- --testPathPattern=youtube// Example test for ad detection
describe('YouTubeAdBlocker', () => {
test('should detect video ads', () => {
const adElement = createMockElement('.ytp-ad-module');
expect(isVideoAd(adElement)).toBe(true);
});
test('should skip detected ads', async () => {
const video = createMockVideo({ ad: true });
await skipAd(video);
expect(video.currentTime).toBe(video.duration);
});
});- Open the AdEclipse options page
- Navigate to "Website Rules"
- Add a domain and CSS selector:
- Domain:
example.com - Selector:
.custom-ad-class, #ad-container
- Domain:
- The rule is applied immediately
- Click the AdEclipse icon in your toolbar
- Toggle "Disable on this site"
- Or add sites manually in Options → Website Rules → Whitelist
Create a new content script or add selectors to rules/site-selectors.json:
{
"example.com": {
"selectors": {
"banner": [".site-specific-ad", "[data-ad-slot]"],
"sidebar": ["#right-rail-ads"],
"native": [".sponsored-post"]
},
"aggressive": false
}
}| Mode | Description |
|---|---|
| Balanced | Recommended default with performance optimization |
| Aggressive | Maximum blocking, may affect some content |
| Light | Essential ads only, less intrusive |
| Setting | Default | Description |
|---|---|---|
| Auto-skip | On | Automatically skip skippable ads |
| Skip/End Ad Handling | On | Seeks ad playback to end and triggers skip when available |
| Mute | On | Mute ads during playback |
| Overlay Cleanup | On | Removes YouTube ad overlays and promoted UI elements |
| Setting | Default | Description |
|---|---|---|
| Observer debounce | 100ms | MutationObserver throttling |
| Performance mode | Off | Reduces observation frequency |
| ML detection | Off | Enable TensorFlow.js detection |
// Get current settings
const settings = await chrome.runtime.sendMessage({ type: 'GET_SETTINGS' });
// Update settings
await chrome.runtime.sendMessage({
type: 'UPDATE_SETTINGS',
data: { enabled: true, mode: 'balanced' }
});
// Get statistics
const stats = await chrome.runtime.sendMessage({ type: 'GET_STATS' });
console.log(`Blocked today: ${stats.today.adsBlocked}`);
// Record blocked ad
await chrome.runtime.sendMessage({
type: 'INCREMENT_BLOCKED',
data: { type: 'videoAd', domain: 'youtube.com' }
});// Get site state for current page
const siteState = await chrome.runtime.sendMessage({
type: 'GET_SITE_ENABLED'
});
// Request selectors for hostname
const selectors = await chrome.runtime.sendMessage({
type: 'GET_SELECTORS',
data: { hostname: window.location.hostname }
});- Make sure AdEclipse is enabled (check the popup)
- Check if the site is whitelisted
- Try switching to "Aggressive" mode
- Add custom selectors for the specific ads
- Enable "Performance Mode" in settings
- Increase the observer debounce value
- Disable ML detection if enabled
- Check for error messages in the browser console
- Try reloading the extension
- Clear browser cache and reload the page
- Check for conflicts with other extensions
| Browser | Version | Status |
|---|---|---|
| Chrome | 111+ | ✅ Full support |
| Edge | 111+ | ✅ Full support |
| Firefox | 109+ | ✅ Full support |
| Brave | Latest | ✅ Full support |
| Opera | 97+ | ✅ Full support |
| Safari | - | ❌ Not supported |
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests:
npm test - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow the existing code style
- Add tests for new features
- Update documentation as needed
- Keep commits atomic and well-described
AdEclipse is committed to user privacy:
- No data collection: We don't collect any user data
- No telemetry or tracking: We don't profile users or collect browsing analytics
- Local-first processing: Blocking happens in-browser (rule updates may fetch from configured sources when enabled)
- No tracking: We don't track your browsing history
- Open source: Full transparency in how your data is handled
MIT License - see LICENSE for details.
- YouTube video ad blocking
- General website ad blocking
- Anti-adblock bypass
- 500+ blocked ad domains
- Popup and options UI
- Statistics tracking
- Custom rules support
- Import/export settings
- Optional ML-based detection
- Manifest V3 migration guidance from Google Chrome team
- Community filter lists for domain references
- TensorFlow.js for ML capabilities
Made with ❤️ for a better web experience