YouTube Theater Fill (Brave) — v3.2 clean + OSD

Minimal, stability-first build for Brave: auto-enable Theater and fill viewport height with clean letterboxing.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

作者
Left234
今日安裝
1
安裝總數
19
評價
0 0 0
版本
3.2-stable
建立日期
2025-11-02
更新日期
2025-11-12
尺寸
14.6 KB
授權條款
MIT
腳本執行於


YouTube Theater Fill in action

Theater mode fully expanded.

⚠️ Tested and written for Brave, works on Chrome too. For Firefox press T if anything goes wrong. It will save to cache and work from then on.

On YouTube:

  • Automatically enables Theater mode
  • Resizes Theater mode to use the full available height
  • Scrolls to top just in case
  • ArrowUp/ArrowDown keys adjust volume from anywhere on the page
  • Shift + Arrow = 10% steps, M toggles mute
  • On-screen volume overlay when changing volume or muting

No extra buttons. No bloat. Just a better video layout, now with seamless volume control.

To exit Theater mode, just press T or the Theater button as normal.


More info:

  • Automatic Theater mode:
    As soon as you're on a watch page, the script enables Theater mode, even before YouTube's frontend finishes loading.
    It also sets YouTube’s built-in Theater preference keys in localStorage, so your view stays wide even across reloads.
  • Viewport-aware smart scaling:
    The player is resized to use the full available vertical space, subtracting the masthead’s height.
    It uses dvh or svh units if supported (for mobile-resilience and modern viewport logic),
    then falls back to 100vh if needed. This keeps sizing accurate even in responsive or dynamic-layout environments.
  • Global volume control:
    No need to click the player first - and always adjust volume on video pages.
    Shift boosts the step size for quicker control. Press M to mute or unmute at any time.
    A minimal on-screen overlay confirms volume changes visually.
  • Header offset calculation:
    The script dynamically measures the header height and subtracts it from the video container’s height.
    This ensures that the video never gets overlapped or cut off by sticky UI elements, even if YouTube changes the masthead height mid-session.
  • Automatic scroll-to-top:
    Upon entering a video, the script scrolls the page to the top just in case. This ensures the video starts fully visible with no dead space above it,
    even if you're coming from another tab with prior scroll state.
  • Fullscreen header suppression:
    In rare cases, YouTube's sticky header or layout containers introduce stray black bars when you go fullscreen in Theater mode.
    This script detects fullscreen state changes and temporarily repositions the header to avoid any layout collision.
    It restores the original layout as soon as fullscreen is exited.
  • Stable behavior across YouTube’s single-page app (SPA):
    The script listens for internal navigation events (yt-navigate and others),
    re-checking the layout and applying itself whenever the route changes.
    No need to refresh manually or rely on brittle intervals.
  • No effect on non-video pages:
    The script only activates on /watch pages and ignores Shorts, YouTube Music, and embeds.
    These are either excluded in metadata or bypassed via DOM checks.