您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fix the big playbar if you have it.
当前为
// ==UserScript== // @name Fix Oversized playbar in Youtube Theater Mode // @namespace http://tampermonkey.net/ // @version 0.3 // @license MIT // @description Fix the big playbar if you have it. // @author re11ding // @run-at document-start // @match https://www.youtube.com/* // @include /^https?://www\.youtube\.[^/]/ // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js // ==/UserScript== (function() { const removeImproperClasses = () => { $("div.ytp-hide-info-bar").removeClass("ytp-big-mode"); $("div.ytp-popup").removeClass("ytp-big-mode"); }; var applyCSSStyle = function() { var style = document.createElement('style'); style.setAttribute('media', 'screen'); style.appendChild(document.createTextNode('')); document.head.appendChild(style); style.sheet.insertRule('.ytp-volume-slider-active .ytp-volume-panel {width: 72px !important;}'); } var fixPlaybar = function() { const mutationObserver = new MutationObserver(removeImproperClasses); mutationObserver.observe(document, { subtree: true, childList: true }); } var checkElementThenRun = function(selector, func) { var el = document.querySelector(selector); if ( el == null ) { if (window.requestAnimationFrame != undefined) { window.requestAnimationFrame(function(){ checkElementThenRun(selector, func)}); } else { document.addEventListener('readystatechange', function(e) { if (document.readyState == 'complete') { func(); } }); } } else { func(); } } checkElementThenRun('head', applyCSSStyle); checkElementThenRun('#player', fixPlaybar); })();