Skip to content

Add setting to hide YouTube AI-labeled videos across feeds (#4254) - #4275

Open
FaiziNerd wants to merge 1 commit into
code-charity:masterfrom
FaiziNerd:feature/hide-ai-content-4254
Open

Add setting to hide YouTube AI-labeled videos across feeds (#4254)#4275
FaiziNerd wants to merge 1 commit into
code-charity:masterfrom
FaiziNerd:feature/hide-ai-content-4254

Conversation

@FaiziNerd

Copy link
Copy Markdown

Summary

  • Adds a General setting Hide AI-labeled videos for issue 💡Hide AI videos #4254
  • Detects YouTube AI disclosure labels on watch/Shorts pages, remembers video IDs, and hides those items across home/related/search/feeds
  • Includes Clear remembered AI videos, EN locale strings, and page-world injection wiring

How it works

YouTube often shows AI labels only after opening a video (not on every thumbnail). This feature:

  1. Detects the AI label on watch/Shorts
  2. Remembers the video ID in storage
  3. Hides that video site-wide in feeds (blocklist-style class marking + CSS)
  4. Also hides cards that already show a “Made with AI” / “Altered or synthetic” badge when present

Bug fixes included

  • Avoid false positives from generic phrases like “How this content was made” (also used for camera disclosures)
  • Avoid matching bare “AI” text outside badge/button contexts under the player/Shorts overlay
  • Ignore stale ytInitialPlayerResponse when its videoId does not match the current video (SPA navigations)

Known limitation

First-time AI videos may still appear until identified once; afterward they stay hidden across pages.

Test plan

  • Load unpacked extension and enable Hide AI-labeled videos
  • Open a watch page with a visible AI label → video ID is remembered
  • Confirm that video is hidden on home, related/suggested, and search
  • Open a non-AI video → it is not hidden
  • Toggle the setting off → items become visible again
  • Use Clear remembered AI videos → list resets
  • Navigate between videos (SPA) and confirm non-AI videos are not wrongly marked

Closes #4254

…ity#4254)

Learn AI disclosure labels on watch/Shorts, remember video IDs, and hide those items site-wide like other feed filters.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

💡Hide AI videos

1 participant