YouTube - Force 4-row thumbnails on home feed + Compact subscriptions page

This style forces the 4-row thumbnails on homepage feed (this also includes both compact thumbnails on subscriptions feed and disabling gigantic search result thumbnails).

当前为 2025-04-23 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

/* ==UserStyle==
@name         YouTube - Force 4-row thumbnails on home feed + Compact subscriptions page
@version      20250423.16.21
@namespace    userstyles.world/user/magma_craft
@description  This style forces the 4-row thumbnails on homepage feed (this also includes both compact thumbnails on subscriptions feed and disabling gigantic search result thumbnails).
@author       magma_craft
@license      CC Zero
==/UserStyle== */

@-moz-document domain("youtube.com") {
/* Revert 3-row thumbnails on home page back to 4-row one */
[page-subtype="home"] #contents.ytd-rich-grid-renderer {
  --ytd-rich-grid-items-per-row: 4 !important;
}

ytd-browse.style-scope.ytd-page-manager[page-subtype="home"] > ytd-two-column-browse-results-renderer > #primary.ytd-two-column-browse-results-renderer > ytd-rich-grid-renderer > #contents.ytd-rich-grid-renderer {
  width: 96% !important;
}

ytd-browse.style-scope.ytd-page-manager[page-subtype="home"] #contents > ytd-rich-grid-row,
ytd-browse.style-scope.ytd-page-manager[page-subtype="home"] #contents > ytd-rich-grid-row > #contents {
  display: contents !important;
}

ytd-browse.style-scope.ytd-page-manager[page-subtype="home"] > ytd-two-column-browse-results-renderer > #primary.ytd-two-column-browse-results-renderer > ytd-rich-grid-renderer > #contents.ytd-rich-grid-renderer > #contents > ytd-rich-grid-row > #contents > ytd-rich-item-renderer > #content {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Font size and other fixes for the homepage info */
[page-subtype="home"] ytd-video-meta-block[rich-meta][mini-mode] #byline-container.ytd-video-meta-block {
  font-size: 1.4rem !important;
}

[page-subtype="home"] ytd-video-meta-block[rich-meta][mini-mode] #metadata-line.ytd-video-meta-block {
  font-size: 1.4rem !important;
}

[page-subtype="home"] #content.ytd-rich-section-renderer {
  margin: 0 8px !important;
}

/* Force compact thumbnails on subscriptions page */
[page-subtype="subscriptions"] #avatar-link.ytd-rich-grid-media, [page-subtype="subscriptions"] #avatar-container.ytd-rich-grid-media {
display: none !important;
margin-right: 0 !important
}

[page-subtype="subscriptions"] #video-title.ytd-rich-grid-media {
font-size: 1.4rem !important;
line-height: 1.8rem !important
}

[page-subtype="subscriptions"] ytd-video-meta-block[rich-meta] #channel-name.ytd-video-meta-block, [page-subtype="subscriptions"] ytd-video-meta-block[rich-meta] #metadata-line.ytd-video-meta-block {
font-size: 1.2rem !important
}

[page-subtype="subscriptions"] ytd-rich-shelf-renderer {
display: none !important
}

[page-subtype="subscriptions"] ytd-rich-item-renderer {
margin-left: 0px !important;
margin-right: 0px !important;
margin-bottom: 24px;
width: calc(100% / var(--ytd-rich-grid-items-per-row) - 4px - 0.01px)
}

[page-subtype="subscriptions"] h3.ytd-rich-grid-video-renderer {
margin: 8px 0 8px !important
}

[page-subtype="subscriptions"] ytd-primetime-promo-renderer.ytd-rich-section-renderer, [page-subtype="subscriptions"] ytd-inline-survey-renderer.ytd-rich-section-renderer {
border-top: 1px solid var(--yt-spec-10-percent-layer);
border-bottom: 1px solid var(--yt-spec-10-percent-layer)
}

[page-subtype="subscriptions"] ytd-thumbnail[size=large] a.ytd-thumbnail, [page-subtype="subscriptions"] ytd-thumbnail[size=large]:before {
border-radius: 8px !important
}

ytd-thumbnail[size=large] ytd-thumbnail-overlay-time-status-renderer.ytd-thumbnail, ytd-thumbnail[size=large] ytd-thumbnail-overlay-button-renderer.ytd-thumbnail, ytd-thumbnail[size=large] ytd-thumbnail-overlay-toggle-button-renderer.ytd-thumbnail {
margin: 4px !important
}

[page-subtype="subscriptions"] div.ghost-grid.style-scope.ytd-ghost-grid-renderer {
display: none !important
}

[page-subtype="subscriptions"] html:not(.style-scope) {
--ytd-rich-grid-item-max-width: 210px !important;
--ytd-rich-grid-item-margin: 4px !important
}

[page-subtype="subscriptions"] #contents.ytd-rich-grid-renderer, [page-subtype="subscriptions"] #grid-header.ytd-rich-grid-renderer {
width: calc(100% + 4px + 0.01px) !important;
max-width: calc( var(--ytd-rich-grid-items-per-row) * (var(--ytd-rich-grid-item-max-width) + var(--ytd-rich-grid-item-margin))) !important
}

@media (max-width: 456px) {ytd-rich-grid-renderer {--ytd-rich-grid-items-per-row: 1 !important;--ytd-rich-grid-posts-per-row: 1 !important;}}

[page-subtype="subscriptions"] ytd-rich-grid-renderer, [page-subtype="subscriptions"] ytd-rich-grid-renderer.style-scope.ytd-two-column-browse-results-renderer {
--ytd-rich-grid-items-per-row: var(--grid-items-videos--per-row) !important;
--ytd-rich-grid-posts-per-row: var(--grid-posts-videos-per-row) !important
}

@media (max-width: 456px) {html:not(.style-scope) {--grid-items-videos--per-row: 1;--grid-posts-videos-per-row: 1;}}

@media (min-width: 457px) {html:not(.style-scope) {--load-videos-items-per-row: 903px;--grid-items-videos--per-row: 2;--grid-posts-videos-per-row: 2;}}@media (min-width: 647px) {html:not(.style-scope) {--load-videos-items-per-row: 1300px;--grid-items-videos--per-row: 3;--grid-posts-videos-per-row: 3;}}

@media (min-width: 957px) {html:not(.style-scope) {--load-videos-items-per-row: 1680px;--grid-items-videos--per-row: 4;--grid-posts-videos-per-row: 3;}}

@media (min-width: 1171px) {html:not(.style-scope) {--load-videos-items-per-row: 2013px;--grid-items-videos--per-row: 5;--grid-posts-videos-per-row: 3;}}

@media (min-width: 1600px) {html:not(.style-scope) {--load-videos-items-per-row: 2348px;--grid-items-videos--per-row: 6;--grid-posts-videos-per-row: 3;}}

[page-subtype="subscriptions"] ytd-rich-grid-renderer #contents ytd-rich-grid-row, 
[page-subtype="subscriptions"] ytd-rich-grid-renderer #contents ytd-rich-grid-row #contents {
display: contents !important
}

[page-subtype="subscriptions"] #contents.ytd-rich-grid-renderer, [page-subtype="subscriptions"] #grid-header.ytd-rich-grid-renderer {
--ytd-rich-grid-item-max-width: 210px !important
}
}