Copyright (c) 2024 Anand
MuteAd is a Chrome extension that allows users to automatically mute the volume of a tab when ad shows up during the match, and then restore the volume after the ad is over.
The extension works by observing changes in the DOM of the active tab. When a specified HTML element (e.g., a <div>
with a particular class) appears in the webpage, the extension automatically mutes the tab's volume. Once the specified element disappears from the webpage, the extension restores the tab's volume after a 2-second delay.
- Automatically mutes tab volume when a specified HTML element appears on the webpage.
- Restores tab volume after a 2-second delay when the specified HTML element disappears.
- Clone or download this repository to your local machine.
- Open Google Chrome.
- Navigate to
chrome://extensions/
. - Enable "Developer mode" by toggling the switch in the top right corner.
- Click on "Load unpacked" and select the directory where you cloned or downloaded the repository.
- After installing the extension, open any webpage in Chrome.
- When the specified HTML element (e.g., a
<div>
with a particular class) appears on the webpage, the tab's volume will automatically mute. - Once the specified HTML element disappears from the webpage, the tab's volume will be restored after a 2-second delay.
You can customize the behavior of the extension by modifying the following files:
content.js
: Modify the logic to observe changes in the DOM and trigger volume control.background.js
: Adjust the volume control logic and delay time.
If you encounter any issues or have suggestions for improvement, please open an issue on GitHub.