A Tampermonkey userscript that blacks out video thumbnails from a specific YouTube playlist and hides spoiler information (like sports scores) across all of YouTube.
- Thumbnail Blackout: Completely blacks out thumbnails of videos from a specified playlist
- Spoiler Protection: Rewrites video titles to hide scores (e.g., "Chelsea 1-2 Aston Villa" becomes "Chelsea vs Aston Villa")
- Comprehensive Coverage: Works across ALL YouTube locations:
- YouTube home page
- Search results
- Playlist pages and headers
- Suggested videos sidebar
- End screen cards (video player overlays)
- Video wall suggestions (suggested videos on player)
- Playlist panel (right side when watching from playlist)
- Watch page titles
- Browser tab titles
- Dynamic Updates: Handles YouTube's infinite scroll and SPA navigation automatically
Install Tampermonkey extension for your browser:
- Click this link to install: pl-spoiler-block.user.js
- Tampermonkey will open and show the installation page
- Click "Install"
The script will automatically check for updates from GitHub.
- Download
pl-spoiler-block.user.js - Open Tampermonkey dashboard
- Click the "+" tab to create a new script
- Paste the script content
- Click File > Save (or Ctrl+S)
By default, the script is configured for a specific playlist. To customize:
- Open Tampermonkey dashboard
- Click the edit icon next to "YouTube Playlist Blackout"
- Find line 17:
const PLAYLIST_ID = 'PLISuFiQTdKDWLIeau9w3aVwtiFsKwarBe'; - Replace the playlist ID with your desired playlist
- You can find the playlist ID in the URL:
youtube.com/playlist?list=YOUR_PLAYLIST_ID
- You can find the playlist ID in the URL:
- Save the script (Ctrl+S)
- Fetches Video IDs: On page load, the script fetches all video IDs from the specified playlist
- Monitors Page Changes: Uses MutationObserver to watch for new content (infinite scroll, navigation)
- Processes Thumbnails: When matching videos are found, it:
- Applies
brightness(0)filter to make thumbnails completely black - Hides thumbnail overlays
- Rewrites titles to remove score information
- Applies
- Tab Title Protection: Continuously monitors and updates the browser tab title to prevent spoilers
The script automatically detects and rewrites titles containing scores. It supports multiple formats:
Format 1 (with pipes):
| Team A 1-0 Team B |
Format 2 (description with score):
Description text | Team A 1-0 Team B | Suffix
Both are rewritten to:
Team A vs Team B
The script splits titles by the | character and looks for segments matching the pattern Team A [score] Team B, then removes the score to prevent spoilers.
- Make sure you've configured the correct playlist ID
- Check the browser console (F12) for
[Blackout]messages - Verify Tampermonkey is enabled for YouTube
- The script looks for titles with pipe-separated segments containing
Team A [score] Team Bpatterns - The score must be in format
X-Y(e.g., "1-0", "3-2") - If your titles use a completely different format, you may need to adjust the logic in the
getRewrittenTitle()function
- Verify the
@updateURLand@downloadURLin the script header point to your GitHub repository - Check Tampermonkey settings for update frequency
- Make changes to the script
- Save in Tampermonkey
- Refresh YouTube to test
After pushing changes to GitHub:
- Increment the
@versionnumber in the script header - Users will automatically receive updates based on their Tampermonkey settings
MIT License - Feel free to modify and distribute
Author: Antigravity