Skip to content

Latest commit

Β 

History

1 Commit

Folders and files

Repository files navigation

πŸ›‘οΈ Spotify Ad Shield β€” Ultimate Spotify Web Ad Blocker (Manifest V3)

Manifest V3 Spotify Platform License


A modern, lightning-fast Chrome/Chromium extension that completely eliminates audio ads, video interstitials, banners, and upgrade popups on Spotify Web Player.

Features β€’ Installation Guide β€’ How It Works β€’ Creator β€’ FAQ


Spotify Ad Shield UI Preview

🌟 Why Spotify Ad Shield?

Unlike generic ad blockers that break Spotify's web player or cause awkward pauses between songs, Spotify Ad Shield is built specifically for Spotify's internal playback engine:

  • πŸ”‡ Instant Mute & 16x Fast-Forward: Ad audio is muted before you hear a single second and accelerated to 16x speed to skip directly to your next track.
  • ⚑ Zero-Flicker Banner Stripping: High-priority CSS drops billboard ads, top-bar sponsors, and premium banners before the page paints.
  • πŸ›‘ Upgrade Dialog Auto-Dismissal: Automatically dismisses "Enjoy ad-free music" and "Pick up where you left off" upsell popups.
  • πŸ“Š Dynamic Audio Visualizer: Features live audio equalizer and frequency wave graphs in a sleek Spotify dark-mode interface.
  • πŸŽ›οΈ One-Click Master Toggle: Switch protection ON or OFF instantly from the popup.

πŸš€ Installation Guide (Step-by-Step)

Follow these simple steps to install and run Spotify Ad Shield in Google Chrome, Microsoft Edge, Brave, or any Chromium browser:

Step 1: Download or Clone the Repository

Clone the repository using Git:

git clone https://github.com/YASMANTH-VEMULA/spotify-ad-blocker.git

(Or click the green Code button at the top of this GitHub page and select Download ZIP, then extract it to a folder).


Step 2: Open Extensions in Your Browser

Open your Chromium browser and paste the following URL into your address bar:

Browser Address Bar URL
Google Chrome chrome://extensions
Microsoft Edge edge://extensions
Brave Browser brave://extensions

Step 3: Enable Developer Mode

In the top-right corner of the Extensions page, toggle the switch labeled "Developer mode" to ON.

  Developer mode  [  ●  ] (ON)

Step 4: Load the Unpacked Extension

  1. Click the "Load unpacked" button in the top-left toolbar:
  2. In the folder picker dialog, select the cloned/extracted folder:
    spotify-ad-blocker
    
  3. Click Select Folder.

Step 5: Pin and Enjoy!

  1. Click the Extensions puzzle piece icon (🧩) in your browser's top toolbar.
  2. Find Spotify Ad Shield and click the Pin icon (πŸ“Œ) to pin it for quick access.
  3. Navigate to open.spotify.com.
  4. Click the Spotify Ad Shield extension icon:
    • Ensure the switch says ACTIVE PROTECTION.
    • Play any song or playlist β€” all ads will be silenced and auto-skipped!

πŸ› οΈ How It Works Under The Hood

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        Spotify Web Player                              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚       1. Network Layer            β”‚       2. Media Player Hook         β”‚
β”‚  - declarativeNetRequest rules    β”‚  - Hooks HTMLMediaElement in MAIN  β”‚
β”‚  - Blocks spclient ad endpoints   β”‚  - 0s Latency Mute + 16x Speed     β”‚
β”‚  - Drops telemetry trackers       β”‚  - Auto-triggers queue skip        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚       3. DOM & UI Cleanup         β”‚       4. User Controls             β”‚
β”‚  - Injected CSS (zero layout lag) β”‚  - Glassmorphic popup UI           β”‚
β”‚  - Auto-dismiss modal observer    β”‚  - Live Equalizer & Wave Graphs    β”‚
β”‚  - Strips upgrade buttons         β”‚  - Real-time blocked stats counter β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Network Filtering (rules.json): Uses Chromium's high-speed declarativeNetRequest engine to intercept ad-logic requests (spclient.wg.spotify.com/ad-logic/*, audio-ak-spotify-com.akamaized.net/ad/*, and ad networks) before network packets leave your computer.
  2. Playback Automation (content.js & page_hook.js): Hooks into Spotify's HTMLMediaElement prototype. As soon as an ad track starts, volume is instantly zeroed (muted = true), playbackRate is boosted to 16.0, and the track seeks to the end in under 0.2s.
  3. Banner & Overlay Removal (styles/adblock.css): Strips ad banners, sidebars, and upgrade promotions with zero layout shift.

πŸ“‚ Project Architecture

spotify-ad-blocker/
β”œβ”€β”€ manifest.json         # Manifest V3 extension definition & permissions
β”œβ”€β”€ rules.json            # declarativeNetRequest network ad-blocking rules
β”œβ”€β”€ background.js         # Service worker: manages badge state, rulesets & stats
β”œβ”€β”€ content.js            # Isolated world script: DOM observer & promo killer
β”œβ”€β”€ page_hook.js          # MAIN world script: hooks HTMLMediaElement playback
β”œβ”€β”€ generate_icons.js     # Script generating multi-resolution PNG icons
β”œβ”€β”€ styles/
β”‚   └── adblock.css       # Zero-flicker CSS ad suppression styles
β”œβ”€β”€ popup/
β”‚   β”œβ”€β”€ popup.html        # Glassmorphic Spotify dark-mode interface
β”‚   β”œβ”€β”€ popup.css         # Styling, audio equalizer animations & Bento cards
β”‚   └── popup.js          # Master toggle controller & stats synchronizer
β”œβ”€β”€ icons/                # Multi-resolution extension icons (16, 32, 48, 128, SVG)
└── assets/
    └── screenshot.png    # Extension UI preview screenshot

πŸ‘€ Creator & Social Channels

Created by Yasmanth Vemula. Follow and support for more open-source tools:

YouTube Instagram

  • YouTube: @YASMANTHOps β€” Tech tutorials, devlogs & AI automation.
  • Instagram: @yasmanth_vemula β€” Behind-the-scenes & daily updates.

❓ Frequently Asked Questions

Does this require my Spotify account password or token?

No. Spotify Ad Shield operates 100% locally in your browser. It does not collect, store, or transmit your credentials, cookies, or listening history.

Does it work on free Spotify accounts?

Yes. It is specifically optimized for free Spotify Web accounts to silence audio/video ads, remove banners, and skip upgrade popups.

Can I toggle it off when I want to support an artist?

Yes. Open the extension popup anytime and click the master toggle switch to pause protection.


βš–οΈ Disclaimer

This extension is an independent open-source project designed for educational and personal use. Spotify is a trademark of Spotify Technology S.A., registered in the U.S. and other countries. This project is not affiliated with, endorsed by, or associated with Spotify.


Enjoy uninterrupted, ad-free music! ⭐ Star this repository if it helped you!

About

πŸ›‘οΈ Spotify Ad Shield β€” Manifest V3 Chrome extension that mutes and fast-forwards audio ads, strips banners, and auto-dismisses popups on Spotify Web.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages