Focused YouTube

Remove ads, shorts, and algorithmic suggestions on YouTube (EN/NL/DE/FR)

这些是此脚本变更过代码的版本。 显示所有版本。

  • v32 2025-07-04

    Added hideSponsorButton: true option
    Added CSS selectors to hide the sponsor button:

    #sponsor-button (direct ID targeting)
    ytd-video-owner-renderer #sponsor-button (scoped targeting)
    timed-animation-button-renderer (component targeting)
    button[aria-label="Subscribe Plus"] (button-specific targeting)


    Added mobile support with ytm- selectors

    Usage:
    Users can control the sponsor button by setting:
    javascripthideSponsorButton: false, // Set to false to show the sponsor button
    The sponsor button (Subscribe Plus) will now be hidden by default, along with the Thanks and Clip buttons.

  • v31 2025-07-04

    Version 28-31 Changelog:

    Added options to hide Thanks and Clip buttons (hideThanksButton, hideClipButton)
    Enhanced audio track control to prevent automatic language switching
    Blocks YouTube's audio track switching methods (setAudioTrack, selectAudioTrack, changeAudioTrack)
    Hides audio track selector UI elements
    Removed verbose console logging for cleaner operation
    Improved CSS targeting for better element hiding across YouTube UI updates

  • v30 2025-07-04
  • v29 2025-07-04
  • v28 2025-07-04

    Version 28 Changelog:
    Added aggressive multi-audio track blocking to prevent YouTube from automatically switching languages during AirPlay and regular playback. The script now intercepts network requests to only load the original audio track, overrides browser APIs to block track switching, and continuously monitors to force videos back to the original language. Also hides YouTube's audio track selector UI to prevent manual switching. This resolves the common issue where YouTube randomly switches to foreign language audio tracks when streaming via AirPlay or during normal viewing.

  • v27 2025-07-04
  • v26 2025-07-04
  • v2025-07-04.01 2025-07-04

    Updated forced audio track function

  • v2025-06-29.25 2025-07-01

    New Feature - Audio Track Selection: Added forceAudioTrack with preferredAudioLanguage setting for automatic audio language switching

  • v2025-06-29.24 2025-06-29

    🎬 New Feature - Auto Cinema Mode: Implemented forceCinemaMode with multiple detection methods for YouTube's theater mode button
    🧹 New Feature - Filter Bar Removal: Added hideFilterBar option to remove algorithmic category chips with proper spacing compensation
    📐 Spacing Enhancement: Fixed video grid cutoff with comprehensive CSS targeting (32px desktop, 24px mobile padding)
    📋 Settings Refactor: Renamed to DEFAULT_SETTINGS with conservative defaults - disabled homepage redirect, button hiding, and infinite scroll limitations
    🎯 Enhanced Compatibility: Added cross-platform support (desktop/mobile) with multiple fallback selectors for all features
    ✅ Code Organization: Professional function separation with robust error handling and layout compatibility
    Key Improvements

    Auto-activates cinema mode for enhanced viewing experience
    Removes filter bar clutter without breaking video grid layout
    More user-friendly defaults while maintaining core ad-blocking functionality
    Enhanced mobile support across all blocking features

  • v2025-06-29.10 2025-06-29

    Version 2025-06-29.10

    🔧 Fixed: Corrected code execution order - moved nuclear CSS and HTML attribute setting to proper sequence after settings initialization
    📋 Structure: Reorganized script flow to prevent premature execution before UserScript header
    ✅ Compatibility: Restored comprehensive ad blocking logic from working version 2025-06-29.7
    🧹 Cleanup: Removed redundant nuclear destruction intervals in favor of more elegant CSS-based blocking
    🎯 Enhanced: Maintained multi-language sponsored content detection (EN/NL/DE/FR) with fallback mechanisms
    ⚡ Performance: Streamlined initialization sequence with proper DOM ready handlers

  • v2025-06-29.7 2025-06-29

    Version 2025-06-29.7

    🔧 Fixed: Timing issues with ad blocking - added aggressive multi-phase initialization and immediate processing
    ⚡ Improved: Enhanced MutationObserver with 0ms delay for ad content and continuous 1-second monitoring

  • v2025-06-29.6 2025-06-29

    Version 2025-06-29.6

    🔧 Fixed: Major sponsored content blocking enhancement - added detection for all ad view model components (ad-button-view-model, ad-image-view-model, etc.)
    🎯 Improved: Added "Visit site" button detection as ultimate fallback and enhanced ad URL pattern matching

  • v2025-06-29.5 2025-06-29

    Version 2025-06-29.5

    🔧 Fixed: Enhanced sidebar Shorts menu removal - added specific targeting for ytd-guide-entry-renderer with comprehensive text and attribute detection
    🎯 Improved: Better detection of Shorts menu items in both desktop and mobile navigation

  • v2025-06-29.4 2025-06-29

    Version 2025-06-29.3

    🔧 Fixed: Enhanced shorts blocking on homepage - added detection for title-based shorts sections and lockup components
    📜 Added: MIT License
    🎯 Improved: Better shorts detection using multiple fallback methods

    Version 2025-06-29.4

    🔧 Fixed: Enhanced sponsored content blocking - added detection for new ad structures (ytd-video-display-full-buttoned-and-button-group-renderer, ytd-ad-inline-playback-meta-block)
    🎯 Improved: Added Google ad services link detection and enhanced badge detection with accessibility attributes
    🌍 Enhanced: Extended sponsored content terms (added "Advertisement", "Reclame", "Gesponsort", "Promo")

  • v2025-06-29.2 2025-06-29

    🆕 New Features

    Sponsored Content Blocking: Added hideSponsoredContent option to remove sponsored posts from feeds

  • v2025-06-29.1 2025-06-29