A lightweight Manifest V3 Chrome extension that blocks known YouTube/Google ad requests and automatically skips or minimizes in-player ads using Chrome's Declarative Net Request API and Content Scripts
Or clone the repository:
git clone https://github.com/souvik082003/My-Adblocker.git- Blocks known YouTube & Google ad network requests.
- Automatically clicks the Skip Ad button.
- Mutes and speeds up unskippable ads.
- Removes ad overlays and banners.
- Built with Manifest V3.
- Saves enable/disable state using
chrome.storage.local. - Simple popup to toggle the extension.
-
Download the extension using the button above.
-
Extract the ZIP file.
-
Open Chrome and go to:
chrome://extensions -
Enable Developer mode.
-
Click Load unpacked.
-
Select the extracted My-Adblocker folder.
-
Open YouTube and the extension will start working automatically.
Uses Chrome's Declarative Net Request API to block requests sent to common advertising endpoints.
Examples include:
/api/stats/ads/pagead/doubleclick.netgooglesyndication.com
A MutationObserver watches YouTube for changes and automatically:
- Clicks Skip Ad
- Mutes advertisements
- Speeds up unskippable ads
- Removes overlays and banners
Provides a simple On/Off switch.
The selected state is stored with chrome.storage.local, so it persists between browser sessions.
My-Adblocker/
├── manifest.json
├── rules.json
├── content.js
├── popup.html
├── popup.js
└── icons/
└── icon128.png
- JavaScript (ES6)
- HTML
- Chrome Extension Manifest V3
- Declarative Net Request API
- Content Scripts
- MutationObserver
- Chrome Storage API
- YouTube may change its interface, requiring selector updates.
- Some server-side injected ads cannot be blocked with network rules alone.
- Future YouTube updates may affect functionality.
- YouTube may detect ad blockers.
Contributions are welcome!
- Fork the repository.
- Create a new branch.
- Commit your changes.
- Open a Pull Request.
Licensed under the MIT License.