Back to work Browser extension

YouTube Scale-to-Fit

A button for when YouTube leaves black bars on your screen.

Browser extensionJavaScriptCSS
When
2025
Original project screenshot showing a YouTube video scaled to fill the player's height.
The scaled player, from my original project screenshots. The video pictured is an MKBHD review.

The problem

A video can be playing fullscreen and still have black bars above and below it. So I made a small browser extension that adds a Scale button to YouTube’s player controls. Click it and the picture expands to fill the height.

The screenshots show the same paused frame before and after. Before, there are black bars. After (the picture at the top of this page), they’re gone. These are the original screenshots from the project’s repository, including the video I happened to be testing with.

Before scaling, the paused YouTube video has black bars above and below the picture.

One button

That’s the whole interface: one button next to YouTube’s own controls. Once you click it, Scale turns into Unscale, so you can undo it without leaving the player.

A close-up from the original project screenshots shows the added Scale button beside YouTube's playback controls.

Under the hood it’s a Manifest V3 extension with a short JavaScript content script. It waits for the player controls to show up, adds the button, and toggles a CSS class that changes the height of the video and its container. The whole thing is one small file.