The Spotify Web Player injects ads periodically while you're listening. Normal ad blockers will prevent banner ads from appearing, but they do not catch the injected audio.
When an ad is playing, the tab title changes to "Advertisement - ...". This can be taken advantage of. The extension polls the Spotify tab every five seconds and reacts to the title. If the word "Advertisement" is present, the tab is automatically muted. The tab will un-mute automatically when the ads are finished, getting you back to your music.
The ads injected by Spotify have a way higher volume than the music we're usually listening to at home, which means we'd be diving for the volume controls. That was really obnoxious. This extension solves that problem.
This project is pure proof of concept and works as of December 2019. If it breaks, I might not work on fixing it.
Here's a blog post with more details if you're so inclined.
The original version of this extension relied on the chrome.tabs
class which
allowed the script to check the page title with accessing the DOM. Spotify made
a change recently which does not affect the page title. To mute the tab the
conten script checks the DOM the data-testid
attribute on the footer. If the
element returns (not null
, the tab will be muted.)
This isn't published in the Chrome Web Store. To install:
- Use the green Clone or download button on the right and download the ZIP file.
- Extract it somewhere.
- Open a new Chrome tab and type in
chrome:extensions
- If Developer Mode isn't enabled, turn it on.
- Click on Load Unpacked
- Select the folder you just unzipped.
If Spotify is already playing, you'll need to reload the tab to activate the extension.
There are none.
Nothing. It only runs on URLs matching https://*.spotify.com/*
and doesn't
track, store, or send inforamtion anywhere.
Because there is no interaction needed on your part, there is no browser icon. There's nothing to click, nothing to see. Mutify runs in the background happily. You didn't do anthing wrong.
The icon is "Mute" by Thays Malcher from the Noun Project
Absolutely.