Skip to content

DeanAmiridis/userscript-youtube5layout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 YouTube 5 Videos Per Row – Userscript

Tired of YouTube wasting your screen space with just 3 videos per row?
This userscript forces 5 videos per row across the homepage and channel views β€” and keeps them there, even as new videos load dynamically.


✨ Features

  • πŸ”₯ Locks in 5 videos per row consistently
  • ♻️ Fixes YouTube’s lazy-loaded layout bugs
  • πŸ’‘ Reacts to page navigation inside YouTube (SPA-safe)
  • πŸ“ Cleans up margins & font sizing for a better aesthetic
  • ⚑ Lightweight, fast, and easy to install

βœ… Benefits

  • More content visible per screen
  • Cleaner, more professional layout
  • Zero UI bugs or element clipping
  • Works with both light and dark mode

πŸ“¦ Installation

  1. Install Tampermonkey (or similar)
  2. Click πŸ‘‰ Install the Script
  3. Refresh YouTube and enjoy the upgrade!

πŸ–₯ Compatibility

  • βœ… Chrome
  • βœ… Firefox
  • βœ… Safari
  • βœ… Edge

Fully tested across desktop browsers.
Mobile not currently supported.


🧠 How it Works

YouTube uses lazy grid loading and single-page navigation. This script:

  • Overrides their CSS variable --ytd-rich-grid-items-per-row
  • Observes DOM mutations and reapplies layout styles
  • Forces reflow to handle early-rendered rows

No jank. No flash. Just clean layout.


πŸ“œ License

MIT β€” Use it, remix it, ship it.

About

userscript that sets your YouTube video layout to 5 videos per row.

Resources

License

Stars

Watchers

Forks

Packages

No packages published