您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Restores the old solid red YouTube progress bars (video player, thumbnail overlay, and top loading bar) and ensures the style is applied dynamically even on page loads or DOM changes.
当前为
// ==UserScript== // @name Old Red YouTube Progress Bar // @namespace https://greasyfork.org/en/users/1384870 // @version 1.0 // @description Restores the old solid red YouTube progress bars (video player, thumbnail overlay, and top loading bar) and ensures the style is applied dynamically even on page loads or DOM changes. // @author Rastrisr // @match *://*.youtube.com/* // @license MIT // ==/UserScript== (function() { 'use strict'; // Function to restore the old red YouTube progress bars function applyOldRedProgressBar() { let styleElement = document.createElement('style'); styleElement.innerHTML = ` .ytp-play-progress { background: #FF0000 !important; /* Old solid red color for the video player progress bar */ } #progress.ytd-thumbnail-overlay-resume-playback-renderer { background: #FF0000 !important; /* Old solid red color for the thumbnail overlay progress bar */ } #progress.yt-page-navigation-progress { background: #FF0000 !important; /* Old solid red color for the top loading bar */ } `; document.head.appendChild(styleElement); } // MutationObserver to ensure the red progress bar style is reapplied dynamically function observeForChanges() { const observer = new MutationObserver(() => { applyOldRedProgressBar(); // Reapply the old red progress bars when DOM changes are detected }); observer.observe(document.body, { childList: true, subtree: true }); } // Initial application of the old red progress bars and setting up the observer setTimeout(() => { applyOldRedProgressBar(); observeForChanges(); // Start observing for DOM changes }, 2000); })();