YouTube Fullscreen Classic 2024 Title

Reverts the fullscreen title to the classic top-left style, and hides it when player controls auto-hide.

目前為 2025-10-17 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 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 Classic 2024 Title
// @namespace    http://tampermonkey.net/
// @version      1.6
// @description  Reverts the fullscreen title to the classic top-left style, and hides it when player controls auto-hide.
// @author       Gemini & ChatGPT
// @match        https://www.youtube.com/*
// @grant        GM_addStyle
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    const customCSS = `
        /* --- 1. Hide new overlay --- */
        .ytp-fullscreen yt-player-overlay-video-details-renderer,
        .ytp-fullscreen .ytp-overlay-top-left .ytp-fullscreen-metadata {
            display: none !important;
        }

        /* --- 2. Restore classic top-left title --- */
        .ytp-fullscreen .ytp-chrome-top {
            display: flex !important;
            position: absolute !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            height: auto !important;
            background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%) !important;
            padding: 0 10px !important;
            box-sizing: border-box !important;
            z-index: 21 !important;
            pointer-events: none !important;
            transition: opacity 0.3s ease !important;
            opacity: 1 !important;
        }

        /* When the player hides its controls, hide the title too */
        .ytp-fullscreen.ytp-autohide .ytp-chrome-top {
            opacity: 0 !important;
        }

        /* Title container */
        .ytp-fullscreen .ytp-chrome-top .ytp-title {
            position: static !important;
            display: block !important;
            margin: 0 !important;
            pointer-events: none !important;
        }

        .ytp-fullscreen .ytp-chrome-top .ytp-title-text {
            display: block !important;
        }

        .ytp-fullscreen .ytp-chrome-top .ytp-title-text .ytp-title-link {
            color: white !important;
            font-size: 2.5rem !important;
            font-weight: normal !important;
            text-decoration: none !important;
            cursor: default !important;
            pointer-events: none !important;
            text-shadow: 0 0 5px rgba(0,0,0,0.7);
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            max-width: 80vw !important;
            display: inline-block !important;
        }

        .ytp-fullscreen .ytp-chrome-top .ytp-title-subtext,
        .ytp-fullscreen .ytp-gradient-top {
            display: none !important;
        }
    `;

    if (typeof GM_addStyle !== 'undefined') {
        GM_addStyle(customCSS);
    } else {
        const style = document.createElement('style');
        style.textContent = customCSS;
        document.head.appendChild(style);
    }
})();