Greasy Fork is available in English.

YouTube - Force Compact Grid (increases max # videos per row)

Force YouTube to show compact grid (max 6 videos per row) rather than "slim" grid (max 3 videos per row)

< Feedback on YouTube - Force Compact Grid (increases max # videos per row)

Review: Good - script works

§
Posted: 04. 02. 2023
Edited: 04. 02. 2023

Not sure if it's only on my system, but the compact grid on the subscription page has a bit of padding/margin on the left/right sides, whereas while using your script, on home/channel pages, there is none and it goes edge to edge. Is there any way to make it mimic the spacing so it appears more like the subscriptions page?

lbmaianAuthor
§
Posted: 05. 02. 2023

If you try resizing the window, you'll see that the subscription page also doesn't have padding. The home page is just unique in that its video thumbnails resize (up to a point) when resizing the window, while neither the subscription nor channel tab vidoe thumbnails do. I'm sure why that's the case; I'll need to delve deeper into YT's obfuscated code to figure out why.

§
Posted: 06. 02. 2023

Fair enough. I thought perhaps it had something to do with my modified Firefox settings (layout.css.devPixelsPerPx) which allow me to fit 6 across channel & subscription pages easily.

lbmaianAuthor
§
Posted: 12. 02. 2023

Investigated this and updated the script to disable the home page's "rich grid" such that it now matches that of subscription/channel pages.

§
Posted: 12. 02. 2023
Edited: 12. 02. 2023

Looks great! Finally, uniformity amongst the various video pages :)

At least in a full browser window, subscriptions resized differently than both homepage and channel pages (both of which resize thumbnails, whereas subscriptions reduces the number of thumbnails), but that could again be specific to my system.

This is still a 1000% improvement over the default Youtube UI. Thank you.

§
Posted: 21. 03. 2023

Investigated this and updated the script to disable the home page's "rich grid" such that it now matches that of subscription/channel pages.

Was working great before, but I just noticed that for whatever reason, the padding is once again gone on the main page, although it is present on channel pages.

lbmaianAuthor
§
Posted: 21. 03. 2023

*sigh* They probably changed the internals in some way to break that part of the script. I'll investigate it when I have the time.

§
Posted: 22. 03. 2023

YouTube can not stop trying to deliver the worst experience possible 🤣

lbmaianAuthor
§
Posted: 03. 04. 2023

I've fixed this again for the latest YT version.

§
Posted: 04. 04. 2023

Fantastic work, thank you.
Was it a difficult fix?

lbmaianAuthor
§
Posted: 04. 04. 2023

Took about an hour to retrace the internals.
Now I'm trying to figure out how to change the default sorting away from the "For You" stupidity they just added...though that would go in a separate userscript.

§
Posted: 04. 04. 2023
Now I'm trying to figure out how to change the default sorting away from the "For You" stupidity they just added...though that would go in a separate userscript.

That change hasn't hit me yet, channels are still sorting by latest, but that will definitely be annoying once it arrives, so good luck with the script.

§
Posted: 05. 06. 2024

is there a way to reduce the thumbnails to show only 5 across? 6 is too much or the spacing is fked, because theres massive gaps on the left and right leaving the thumbnails to be tiny in the center. (yellow/black scribbled area is a video i blocked out cuz it seems inappropriate)

(this 200kb image file size limit is annoying, had to put it through a resizer a few times to drop it from 500kb)

lbmaianAuthor
§
Posted: 05. 06. 2024

is there a way to reduce the thumbnails to show only 5 across? 6 is too much or the spacing is fked, because theres massive gaps on the left and right leaving the thumbnails to be tiny in the center. (yellow/black scribbled area is a video i blocked out cuz it seems inappropriate)

(this 200kb image file size limit is annoying, had to put it through a resizer a few times to drop it from 500kb)



Unfortunately not. This script doesn't actually specify the # videos per row. That's controlled by the internal grid style, and this script merely switches to the "compact grid" style for the pages its applicable for with no other side effects.

You can try this user css (with stylus extension) instead: https://userstyles.world/style/15314/more-thumbnails-per-row

§
Posted: 12. 09. 2024

Youtube must have made some more changes as the original issue from Feb 4, 2023 has one again returned on Subscriptions and Home feeds (but channel pages remain fine).

lbmaianAuthor
§
Posted: 12. 09. 2024

I'm not seeing any issues on my end. The grid layout/spacing still looks the same across homepage, subscriptions page, channel pages for me. I'm guessing this is yet another YT experiment that hasn't rolled out to me, so until that happens I have no idea what could be the issue.

§
Posted: 13. 09. 2024
Edited: 13. 09. 2024

Must be yes, hopefully it switches back. I'm using CSS to fix it for now, except that I'm a hack and I had to center thumbnails to get it to work (otherwise the entire container is sized properly but left aligned with tons of space on right):

/* Resize the thumbnail container */
ytd-rich-item-renderer.ytd-rich-grid-renderer.style-scope:nth-of-type(n) {
width: 210px; /* Set your desired width */
height: auto; /* Maintain aspect ratio */
margin: 2px; /* Example margin */
margin-bottom: 22px; /* Add space below each thumbnail */
}

/* Center the thumbnail container horizontally and top-align items */
#contents.style-scope.ytd-rich-grid-renderer {
display: flex;
justify-content: center; /* Center items horizontally */
align-items: flex-start; /* Align items to the top */
flex-wrap: wrap; /* Allow items to wrap to the next line */
}

Post reply

Sign in to post a reply.