Added feature to mute thumbnil previews#3681
Merged
ImprovedTube merged 2 commits intocode-charity:masterfrom Mar 7, 2026
Merged
Added feature to mute thumbnil previews#3681ImprovedTube merged 2 commits intocode-charity:masterfrom
ImprovedTube merged 2 commits intocode-charity:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Problem
YouTube natively mutes thumbnail previews only on initial page refresh. When hovering over a different video, the preview can start playing with audio—which is intrusive and annoying for users browsing their feed.
💡 Solution
Enhanced the existing
muteThumbnailPreviewsfeature to forcefully mute every new thumbnail preview on hover, not just on initial page load.🛠 Changes
js&css/extension/www.youtube.com/general/general.jsforceMute(): Attachesvolumechangeandplayevent listeners to each preview<video>element to immediately re-mute if YouTube's code tries to unmute it.isPreviewVideo(): Helper for cleaner preview container detection._itMuteEnforcedflag to ensure listeners are only attached once per video element.srcattribute changes to catch when YouTube reuses the same<video>element for a different hover preview.js&css/web-accessible/www.youtube.com/playlist-cleaner.js(New)manifest.jsonweb_accessible_resources—its absence was preventing the extension from loading.⚙️ How It Works
MutationObserverwatches for new preview<video>elements andsrcattribute changes.volumechange+playlisteners that re-mute instantly if audio is restored.#inline-preview-player,ytd-video-preview, etc.)—the main player is unaffected.✅ Testing