YouTube Player with Red Progress Bar and No Gradients

Customize YouTube player on watch page to remove gradients and keep a solid red progress bar

目前为 2024-11-03 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name YouTube Player with Red Progress Bar and No Gradients
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description Customize YouTube player on watch page to remove gradients and keep a solid red progress bar
  6. // @author GPT
  7. // @match https://www.youtube.com/watch*
  8. // @grant GM_addStyle
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Apply custom CSS styling to modify the YouTube player appearance
  15. GM_addStyle(`
  16. /* Remove gradients from the progress bar */
  17. .ytp-swatch-background-color,
  18. .ytp-progress-bar-container,
  19. .ytp-progress-bar-padding {
  20. background: transparent !important;
  21. }
  22.  
  23. /* Set progress bar to solid red */
  24. .ytp-play-progress {
  25. background-color: #FF0000 !important;
  26. background-image: none !important;
  27. }
  28.  
  29. /* Additional customization to minimize gradients on controls */
  30. .ytp-chrome-top,
  31. .ytp-chrome-controls,
  32. .ytp-gradient-bottom,
  33. .ytp-gradient-top,
  34. .ytp-chrome-bottom {
  35. background: none !important;
  36. }
  37. `);
  38.  
  39. console.log("Custom YouTube player styling applied: solid red progress bar, no gradients.");
  40.  
  41. })();