Skip to content

max-in-bc/yt-music-anniversary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YT Music Anniversary Countdown

A Chrome extension that detects album pages on YouTube Music, looks up the exact release date via MusicBrainz, and shows a badge countdown to the album's next anniversary.

How It Works

  1. A content script runs on YouTube Music and detects when you navigate to an album page (Album, EP, or Single). It extracts the album title, artist, and year from the page header.

  2. A background service worker takes the extracted info, queries the MusicBrainz API for the full release date (YYYY-MM-DD), and calculates how many days remain until the next anniversary.

  3. The extension badge updates with the countdown:

    Badge Meaning
    !! (gold) Today is the anniversary
    3d (red) 7 days or less
    22d (orange) 30 days or less
    187d (blue) More than 30 days
    ... Looking up release date
    ? No exact date found on MusicBrainz
  4. Click the extension icon to open a popup with full details: album name, artist, exact release date, countdown, and which anniversary is upcoming.

Install

  1. Clone or download this repo
  2. Open chrome://extensions/ in Chrome
  3. Enable Developer mode (top-right toggle)
  4. Click Load unpacked and select this directory
  5. Navigate to any album on YouTube Music

Files

├── manifest.json     # Extension manifest (Manifest V3)
├── background.js     # Service worker — MusicBrainz lookup, badge updates
├── content.js        # Content script — scrapes album info from YT Music DOM
├── popup.html        # Popup UI
├── popup.js          # Popup logic
└── icons/            # Extension icons

Limitations

  • MusicBrainz coverage: Not every album has an exact release date (YYYY-MM-DD) in MusicBrainz. When only a year is available, the badge shows ?.
  • Rate limiting: MusicBrainz allows 1 request per second. Results are cached in-memory for the session to avoid repeat lookups.
  • YouTube Music DOM: The extension scrapes YT Music's DOM to find album metadata. If YouTube changes their page structure, the selectors may need updating.

License

MIT

About

A Chrome extension that detects album pages on YouTube Music, looks up the exact release date via MusicBrainz, and shows a badge countdown to the album's next anniversary

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors