Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Notification Filter

A Tampermonkey/Greasemonkey userscript that hides YouTube notifications matching keywords you choose.

Default keywords: live, shorts, 30 minutes.

Install

  1. Install a userscript manager: Tampermonkey (Chrome, Edge, Firefox) or Greasemonkey (Firefox).
  2. Open YouTube Notification Filter.user.js and click Raw — your userscript manager prompts to install.
  3. Reload YouTube.

Configure

Open your userscript manager's menu (Tampermonkey icon → YouTube Notification FilterEdit filter keywords) and enter a comma-separated list. Keywords persist across sessions and existing notifications re-filter immediately — no page reload or source editing needed.

Matching is case-insensitive and uses word boundaries: live matches "live" but not "delivered". The default 30 minutes still matches the literal phrase.

Clear the field entirely to disable filtering — an intentional empty list is remembered as-is, not reset to the defaults.

How it works

A MutationObserver watches the page (YouTube is a single-page app that injects notifications dynamically). DOM changes are coalesced with requestAnimationFrame, then the script scans unprocessed ytd-notification-renderer elements and hides any whose text matches a keyword. Each notification is flagged once so it isn't re-scanned on later mutations.

Limitations

  • Notifications are hidden via CSS (display: none), not deleted from your account — the unread bell badge still counts them.
  • Relies on YouTube's current DOM structure (ytd-notification-renderer). If YouTube changes its markup, filtering may stop working until the selector is updated.

License

MIT — see LICENSE.

About

Filter youtube notifications based on keywords

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages