您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes letterboxing by cropping the left and right edges off of full-screen YouTube videos and zooming to fill the screen height.
当前为
It's now relatively common for YouTube videos to have aspect ratios wider than 16:9. By default, if these are played full-screen on a display with a narrower aspect ratio, they are letterboxed with horizontal black bars at the top and bottom. Depending on circumstances, video content and user preference, this might be annoying. It might be preferable to fill the screen height and crop off the sides of the video instead..
This script adds an event listener for the fullscreenchange event. When the video goes full-screen, and after a short delay to allow things to settle down, the script will adjust the dimensions of the video element so that it fills the screen height and is much wider than the screen, so that any excess video width falls outside the screen (i.e. gets cropped off). Video ads can cause the video to return to its default dimensions, so the script also watches for ad playback and re-resizes the video at the start and end of each ad.
To disable the zoom, disable the script and reload the page.
This script probably requires a relatively recent browser version. It may work in browsers other than Firefox and Chrome, but that is untested.
0.1. First release. Probably full of bugs and stupid mistakes. 0.2. Fix incompatibility with Chrome.