yt css

a

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        yt css
// @description a
// @match       https://*.youtube.com/*
// @run-at      document-end
// @version 0.0.1.20251228153150
// @namespace https://greasyfork.org/users/1435046
// ==/UserScript==

(function () {
    const css = `
    ytd-mini-guide-renderer, grid-shelf-view-model, ytd-shelf-renderer, ytm-paid-content-overlay-renderer, .ytSearchboxComponentSuggestionsContainer, div#related, div#chip-bar, .ytp-info-panel-preview, .ytp-pause-overlay-container, .ytp-fullscreen-grid {
    display: none !important;
    }

ytd-video-renderer:has(> div > ytd-thumbnail > a[href^="/shorts/"]), ytd-rich-section-renderer:has(> div#content > ytd-rich-shelf-renderer[is-shorts]), ytd-rich-section-renderer:has(> div#content > ytd-chips-shelf-with-video-shelf-renderer), div#header:has(> ytd-feed-filter-chip-bar-renderer > div#chips-wrapper) {
display: none !important;
}

div#frosted-glass {
    height: revert !important;
}

div#masthead-container {
    background-color: black !important;
}
  `;
    const style = document.createElement('style');
    style.textContent = css;
    document.head.appendChild(style);
})();