Skip to content

Instantly share code, notes, and snippets.

@lucaspar
Last active December 20, 2023 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucaspar/8255b7d37bc219986092674e980c81a3 to your computer and use it in GitHub Desktop.
Save lucaspar/8255b7d37bc219986092674e980c81a3 to your computer and use it in GitHub Desktop.
Denser YouTube's subscriptions view, with smaller thumbnails
! Add these lines to the "my filters" section of ublock origin
www.youtube.com##ytd-rich-section-renderer.ytd-rich-grid-renderer.style-scope:nth-of-type(2)
youtube.com##ytd-rich-grid-renderer:style(--ytd-rich-grid-items-per-row: 12 !important;)
youtube.com##ytd-rich-grid-row, #contents.ytd-rich-grid-row:style(display:contents !important;)
/* Add to Enhancer for YouTube's Custom script section */
;(function () {
document.body.appendChild(document.createElement('style')).innerHTML =
'ytd-rich-grid-row{display:inline-block;width:min-content;}div#contents.ytd-rich-grid-row{margin:0;}' +
'ytd-rich-item-renderer{width:250px;margin:0.5em;}' +
'ytd-video-meta-block[rich-meta] #metadata-line.ytd-video-meta-block{font-size:1rem !important;line-height:initial;}' +
'#video-title.ytd-rich-grid-media{font-size:12px;line-height:initial;}' +
'#text.complex-string.ytd-channel-name,ytd-video-meta-block[rich-meta]#metadata-line.ytd-video-meta-block{font-size:12px;line-height:initial;}'
})()
@lucaspar
Copy link
Author

Expected extensions:

  • uBlock Origin
  • Enhancer for YouTube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment