Skip to content

Instantly share code, notes, and snippets.

@u1-liquid
Last active May 25, 2025 22:09
Show Gist options
  • Save u1-liquid/6e768d1761ec4abed9815268fabcae43 to your computer and use it in GitHub Desktop.
Save u1-liquid/6e768d1761ec4abed9815268fabcae43 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name YouTube Custom CSS
// @namespace https://github.com/u1-liquid
// @version 1.0.1
// @description YouTube上で特定要素を非表示/スタイルを調整
// @grant GM_addStyle
// @author u1-liquid
// @source https://gist.github.com/u1-liquid/6e768d1761ec4abed9815268fabcae43
// @match https://www.youtube.com/*
// @run-at document-idle
// @updateURL https://gist.github.com/u1-liquid/6e768d1761ec4abed9815268fabcae43/raw/youtube-custom-css.user.js
// @downloadURL https://gist.github.com/u1-liquid/6e768d1761ec4abed9815268fabcae43/raw/youtube-custom-css.user.js
// @supportURL https://gist.github.com/u1-liquid/6e768d1761ec4abed9815268fabcae43#new_comment_field
// ==/UserScript==
(function() {
'use strict';
GM_addStyle(`
/* Improve YouTube でブロックリストに入れた動画・チャンネルを非表示 */
ytd-rich-grid-media.it-blocklisted-video,
ytd-rich-grid-media.it-blocklisted-channel,
ytd-video-renderer.it-blocklisted-video,
ytd-video-renderer.it-blocklisted-channel,
ytd-compact-video-renderer.it-blocklisted-video,
ytd-compact-video-renderer.it-blocklisted-channel {
display: none !important;
}
/* YouTube の絵文字ピッカー関連の要素を非表示 */
#search-panel.yt-emoji-picker-renderer,
#category-buttons.yt-emoji-picker-renderer {
display: none !important;
}
/* 絵文字カテゴリの2番目以降を非表示 */
#categories.yt-emoji-picker-renderer > yt-emoji-picker-category-renderer:nth-child(n+2) {
display: none !important;
}
/* 絵文字画像のサイズ調整 */
#emoji.yt-emoji-picker-category-renderer > img {
width: 48px !important;
height: 48px !important;
}
/* サイドバー幅の調整 */
ytd-watch-flexy {
--ytd-watch-flexy-sidebar-width: 20vw !important;
}
/* 絵文字ピッカーの高さ調整 */
yt-live-chat-renderer {
--yt-emoji-picker-renderer-height: 30vh !important;
}
`);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment