您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replace YouTube watch page player with the embed player for distraction-free viewing
// ==UserScript== // @name YouTube Embed Player on Watch Page // @namespace http://tampermonkey.net/ // @version 1.0 // @description Replace YouTube watch page player with the embed player for distraction-free viewing // @author GPT // @match https://www.youtube.com/watch* // @grant none // ==/UserScript== (function() { 'use strict'; // Get video ID from URL const urlParams = new URLSearchParams(window.location.search); const videoId = urlParams.get("v"); if (videoId) { // Replace the entire body with an embedded player iframe document.body.innerHTML = ` <div style="display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background-color: #000;"> <iframe width="100%" height="100%" style="border: none;" src="https://www.youtube.com/embed/${videoId}?autoplay=1" allowfullscreen></iframe> </div> `; } })();