YouTube - Always Theater Mode

Set the default viewing mode to Theater Mode.

当前为 2015-06-23 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        YouTube - Always Theater Mode
// @author      r-a-y
// @namespace   r-a-y/youtube/theater
// @description Set the default viewing mode to Theater Mode.
// @include     http://www.youtube.com/watch*
// @include     https://www.youtube.com/watch*
// @version     1.1
// @grant       none
// ==/UserScript==

document.getElementById('page').className = "watch watch-stage-mode";
document.getElementById('player').className = "content-alignment watch-medium";
document.getElementById('watch7-container').className = "watch-wide";

var playlist = document.getElementById('watch-appbar-playlist');
if (playlist) {
  playlist.setAttribute('style', 'top:520px');
}

var video = document.getElementsByTagName("VIDEO")[0];
if (video) {
  video.setAttribute('style', 'width:100%; height:100%;');
  document.getElementsByClassName('html5-video-content')[0].setAttribute('style', 'width:100%; height:100%;');

  // Progress Bar resizing doesn't work due to YouTube's JS dynamically changing the width to 640px all the time
  //document.getElementsByClassName('html5-progress-bar')[0].setAttribute('style', 'width:100% !important');
}