Remove ads, shorts, and algorithmic suggestions on YouTube (EN/NL/DE/FR)
這裡顯示腳本的所有版本。 只顯示彼此間有代碼差異的版本。
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 buttonThe sponsor button (Subscribe Plus) will now be hidden by default, along with the Thanks and Clip buttons.
Version 28-31 Changelog:Added options to hide Thanks and Clip buttons (hideThanksButton, hideClipButton)Enhanced audio track control to prevent automatic language switchingBlocks YouTube's audio track switching methods (setAudioTrack, selectAudioTrack, changeAudioTrack)Hides audio track selector UI elementsRemoved verbose console logging for cleaner operationImproved CSS targeting for better element hiding across YouTube UI updates
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.
Updated forced audio track function
New Feature - Audio Track Selection: Added forceAudioTrack with preferredAudioLanguage setting for automatic audio language switching
🎬 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 compatibilityKey ImprovementsAuto-activates cinema mode for enhanced viewing experienceRemoves filter bar clutter without breaking video grid layoutMore user-friendly defaults while maintaining core ad-blocking functionalityEnhanced mobile support across all blocking features
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
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
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
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
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 methodsVersion 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")
🆕 New Features
Sponsored Content Blocking: Added hideSponsoredContent option to remove sponsored posts from feeds