Last active
February 28, 2026 21:30
-
-
Save absurd/0da44a0750e24ce85807ab50a45a684f to your computer and use it in GitHub Desktop.
Fix Humongous Youtube Sidebar -- Feb 2026
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
| // ==UserScript== | |
| // @name Resize YouTube Thumbnails | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.2 | |
| // @description Fix humongous youtube sidebar | |
| // @author Gall | |
| // @match *://www.youtube.com/* | |
| // @grant none | |
| // @run-at document-start | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| var style = document.createElement('style'); | |
| // Use textContent instead of innerHTML to satisfy YouTube's Trusted Types CSP | |
| style.textContent = ` | |
| /* Force the sidebar to a specific width */ | |
| #secondary { | |
| //width: 450px !important; | |
| max-width: 450px !important; | |
| } | |
| #secondary .yt-lockup-view-model__content-image { | |
| width: 200px !important; | |
| max-width: 200px !important; | |
| min-width: 200px !important; | |
| } | |
| /* Optional: Hide the skeleton loading shimmer if it ends up being too big */ | |
| #secondary .yt-lockup-view-model__image-container-with-modifiers { | |
| width: 200px !important; | |
| } | |
| #secondary .shortsLockupViewModelHost { | |
| display: none; | |
| } | |
| `; | |
| if (document.head) { | |
| document.head.appendChild(style); | |
| } else { | |
| document.documentElement.appendChild(style); | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment