YouTube Fullscreen Chat Hider

YouTubeの全画面表示時に、チャットのデータ取得機能を維持したままチャット領域を完全に非表示にし、動画領域を画面いっぱいに拡大します。

目前為 2025-11-23 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         YouTube Fullscreen Chat Hider
// @name:en      YouTube Fullscreen Chat Hider
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  YouTubeの全画面表示時に、チャットのデータ取得機能を維持したままチャット領域を完全に非表示にし、動画領域を画面いっぱいに拡大します。
// @description:en This script completely hides the chat area when YouTube is in fullscreen mode, expanding the video viewing area to fill the screen.
// @author       Daito_Amemiya
// @match        *://*.youtube.com/*
// @grant        GM_addStyle
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    GM_addStyle(`
        /* 全画面表示中(ytd-watch-flexy[fullscreen])のスタイルを適用 */

        /* 1. 黒い領域を生成している最上位のコンテナを完全に非表示にする */
        /* #panels-full-bleed-container が動画の幅を制限している可能性が最も高い */
        ytd-watch-flexy[fullscreen] #panels-full-bleed-container {
            display: none !important;
        }

        /* 2. チャットと右側サイドバーのコンテナも完全に非表示にする(安全策) */
        ytd-watch-flexy[fullscreen] #secondary,
        ytd-watch-flexy[fullscreen] #secondary-inner,
        ytd-watch-flexy[fullscreen] #chat-container,
        ytd-watch-flexy[fullscreen] #panels {
            display: none !important;
            width: 0 !important;
            min-width: 0 !important;
        }

        /* 3. 動画の幅を制限している可能性のある最上位のレイアウト要素の制限を解除 */
        ytd-watch-flexy[fullscreen] #columns,
        ytd-watch-flexy[fullscreen] #page-manager {
            width: 100% !important;
            max-width: none !important;
        }

        /* 4. メインの動画プレイヤー領域を強制的に画面いっぱいに広げる */
        ytd-watch-flexy[fullscreen] #primary,
        ytd-watch-flexy[fullscreen] #primary-inner {
            width: 100% !important;
            max-width: none !important;
            margin-right: 0 !important;
        }
    `);
})();