您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Disable Flexy Mode
当前为
// ==UserScript== // @name Youtube No Flexy Mode // @namespace http://tampermonkey.net/ // @version 0.40 // @description Disable Flexy Mode // @author Botan // @match *://*.youtube.com/* // @grant none // @run-at document-end // ==/UserScript== // Thanks to AlexT. this fix does not longer use any intervals, it instead uses the Youtube API directly. (function() { 'use strict'; if (window.top != window.self) return; console.log('Youtube No Flexy Mode'); var ytPlayer; // Sets the player background to black. Otherwise the background might be transparent. function setBackground () { ytPlayer = document.getElementById("movie_player") || document.getElementsByClassName("html5-video-player")[0]; if (ytPlayer) { if(ytPlayer.style.background!=='rgb(0, 0, 0)') { ytPlayer.style.background='#000000'; console.log('Set player background color to black!'); } } } // Disables (if available) the creation of the new flexy dom. function ytNoFlexy() { if (typeof window.yt === "undefined" || window.yt.config_.EXPERIMENT_FLAGS.kevlar_flexy_watch_new_dom === false) { return; } else { window.yt.config_.EXPERIMENT_FLAGS.kevlar_flexy_watch_new_dom = false; console.log('Flexy disabled!'); } } ytNoFlexy(); setBackground(); document.addEventListener("yt-navigate-start", ytNoFlexy, true); document.addEventListener("yt-navigate-finish", setBackground, true); })();