YouTube Layout Plus 是一个专门为桌面端 YouTube 设计的油猴脚本,目标很明确:减少无关干扰、提高首页信息密度、优化播放页的观看体验,同时让常用界面操作更顺手。
这个脚本目前主要处理三类体验:
1. YouTube 首页布局优化
默认将左侧导航切换为折叠状态,保留左上角三条杠按钮的正常展开/收起能力。
同时提升首页主内容区的信息密度,将推荐视频调整为每行 5 个,并隐藏 Shorts 模块,减少对正常长视频浏览的干扰。
此外,首页顶部的分类切换标签也进行了重新设计:
将原本松散的标签样式改成更紧凑的“连体标签栏”风格,视觉上更统一,切换时更清晰,并适配亮色与暗色模式。
2. YouTube 播放页优化
自动隐藏右侧推荐视频侧栏,并将主播放器区域和正文内容居中显示。
这样可以让播放页的视觉重心更集中,减少“边看边被推荐流打断”的问题,尤其适合专注观看、学习、查资料和长时间播放。
3. 顶部主题快速切换
在顶部 Logo 附近加入了一个轻量的三段式主题切换开关:Auto / Light / Dark。
这个开关不是自行模拟主题,而是直接调用 YouTube 官方的 Appearance 功能,因此行为和原生设置保持一致。
这样可以在不打开账户菜单的情况下,快速切换:
主要功能
- 首页默认折叠左侧大导航
- 保留三条杠按钮,支持手动展开和再次折叠
- 首页推荐视频一行显示 5 个,提高浏览效率
- 隐藏 Shorts 区域,减少短视频干扰
- 首页顶部分类标签改为更紧凑的连体标签栏样式
- 连体标签栏支持亮色与暗色模式适配
- 顶部加入
Auto / Light / Dark 三段式主题切换开关
- 主题切换通过 YouTube 官方
Appearance 功能实现
- 播放页隐藏右侧推荐栏
- 播放页主内容区自动居中
- 支持 YouTube 单页应用路由切换,页面跳转后自动重新应用布局
适合谁用
- 不喜欢 YouTube 首页太松散的人
- 想一屏看到更多视频的人
- 经常用 YouTube 看教程、访谈、长视频的人
- 不想在播放页被右侧推荐流打断注意力的人
- 想弱化 Shorts 干扰、把 YouTube 用回“视频网站”而不是“短视频平台”的人
- 希望更方便切换亮色 / 暗色 / 跟随系统主题的人
设计原则
这个脚本尽量不去重写 YouTube 的核心交互逻辑,而是优先调整布局、可见性和操作入口。
例如:
- 首页虽然默认折叠导航,但不会破坏原生的三条杠展开功能
- 播放页隐藏推荐栏后,会同步调整主内容宽度和居中方式,避免出现大面积空白或错位
- 顶部主题切换开关并不自造主题逻辑,而是直接复用 YouTube 官方的主题切换能力
- 分类标签栏的改造以视觉整理为主,不改变原本的标签切换机制
已实现的页面行为
- 刷新首页时,左侧导航默认为折叠状态
- 用户点击三条杠后,可以正常展开菜单,不会被脚本强制立刻折回
- 返回首页或重新进入首页时,会再次恢复默认折叠状态
- 首页推荐视频区域默认以 5 列显示
- 首页 Shorts 模块默认隐藏
- 首页顶部分类标签以更紧凑的连体标签栏形式显示
- 暗色模式下,顶部标签栏会自动切换为适配的深色样式
- 顶部可直接使用
Auto / Light / Dark 快速切换主题
- 在播放页中,推荐侧栏会自动隐藏,主区域自动居中
注意事项
- 目前主要针对桌面端 YouTube 页面设计
- YouTube 会不定期修改 DOM 结构,未来如果官方改版,脚本可能需要跟进更新
- 某些实验性页面、地区差异 UI、A/B Test 布局可能会影响效果
- 如果你同时安装了其他修改 YouTube 布局或主题入口的脚本、扩展,可能会发生冲突
为什么做这个脚本
YouTube 默认布局在桌面端越来越偏“推荐流驱动”,首页信息密度偏低,播放页右侧推荐也容易分散注意力。
同时,一些常用设置入口过深,比如亮色 / 暗色模式切换必须进入账户菜单后再点进二级菜单。
这个脚本的目的不是做一套花哨改版,而是做一组非常实用的布局修正和操作优化,让 YouTube 更适合高频、高效率地浏览和观看。
YouTube Layout Plus is a userscript for desktop YouTube focused on one goal: reducing distraction, improving layout efficiency, and making frequent actions easier to access.
The script currently improves three main areas:
1. YouTube Home Page
It collapses the left navigation by default while keeping the original hamburger button fully functional.
It also increases content density by displaying 5 videos per row and hides Shorts sections to reduce interference from short-form content.
In addition, the top category chips are visually redesigned into a more connected, compact tab-bar style.
This makes the filter row cleaner, easier to scan, and better integrated with both light and dark mode.
2. YouTube Watch Page
It hides the recommendation sidebar on the right and recenters the main player/content area.
This creates a cleaner and more focused viewing experience, especially for long-form videos, tutorials, interviews, and research-heavy browsing.
3. Quick Theme Switcher
A lightweight three-way theme switcher is added near the top logo: Auto / Light / Dark.
This switcher does not fake theme behavior on its own.
Instead, it directly triggers YouTube’s official Appearance options, so it stays aligned with native behavior.
This makes it much easier to switch between:
- device theme
- light theme
- dark theme
without opening the account menu every time.
Main Features
- Collapse the large left guide by default on the homepage
- Keep the hamburger menu working normally for manual expand/collapse
- Show 5 videos per row on the homepage
- Hide Shorts sections on the homepage
- Redesign the homepage category chips into a more compact connected tab bar
- Adapt the top chip bar for both light and dark mode
- Add a top
Auto / Light / Dark segmented theme switcher
- Use YouTube’s official
Appearance behavior for theme switching
- Hide the recommendation sidebar on watch pages
- Center the main content area on watch pages
- Re-apply layout automatically during YouTube SPA navigation
Who This Is For
- Users who want a denser and cleaner YouTube homepage
- Users who prefer seeing more videos per screen
- People who use YouTube for learning, long-form watching, and focused browsing
- Users who dislike the distraction of the right-hand recommendation column
- Anyone who wants YouTube to feel less like a short-video feed and more like a video platform again
- Users who want faster access to light, dark, or system-based theme switching
Design Philosophy
This script tries to improve layout and usability without breaking core YouTube interactions.
For example:
- the homepage guide is collapsed by default, but the native hamburger button still works normally
- watch pages hide the sidebar while properly recentering the primary content
- the theme switcher reuses YouTube’s official Appearance actions instead of inventing a separate theme system
- the category bar is visually redesigned without changing how YouTube’s chip filters actually work
Current Behavior
- The homepage loads with the guide collapsed by default
- Clicking the hamburger button expands the guide normally
- The script does not immediately force the guide closed again after user interaction
- Revisiting the homepage restores the default collapsed state
- The homepage displays videos in a denser 5-column layout
- Shorts sections are hidden on the homepage
- The top category row appears as a more compact connected tab bar
- In dark mode, the top category bar automatically switches to a matching dark style
- The top
Auto / Light / Dark switcher can be used directly without opening the account menu
- Watch pages automatically hide the recommendation panel and center the content
Notes
- Designed primarily for desktop YouTube
- YouTube changes its DOM structure regularly, so future updates may be needed
- Experimental layouts, regional UI differences, or A/B tests may affect behavior
- Conflicts may occur if you use other YouTube layout-modifying extensions or userscripts, especially ones that also alter theme controls or header UI
Why This Script Exists
Desktop YouTube has gradually become more recommendation-driven, with lower information density on the homepage and more distraction on watch pages.
At the same time, some common actions, such as switching between light mode, dark mode, and system theme, are buried too deeply in the account menu.
This script is not meant to redesign YouTube completely.
It is meant to make a set of practical layout and usability improvements that make YouTube more efficient, focused, and comfortable for everyday desktop use.