YouTube: Fix Auto Quality Issue

To fix auto quality issue on YouTube

  1. // ==UserScript==
  2. // @name YouTube: Fix Auto Quality Issue
  3. // @namespace UserScript
  4. // @match https://www.youtube.com/*
  5. // @grant none
  6. // @version 0.1.0
  7. // @license MIT
  8. // @author CY Fung
  9. // @description To fix auto quality issue on YouTube
  10. // @require https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js
  11. // @run-at document-start
  12. // @grant none
  13. // @unwrap
  14. // @allFrames true
  15. // @inject-into page
  16. // ==/UserScript==
  17.  
  18. (() => {
  19.  
  20. function main() {
  21. const arr = [
  22. 'yt-player-bandwidth',
  23. 'yt-player-headers-readable',
  24. 'yt-player-performance-cap',
  25. 'yt-player-quality',
  26. 'yt-player-sticky-caption'
  27. ]
  28.  
  29. for (const s of arr) {
  30.  
  31. localStorage.removeItem(s)
  32. }
  33. }
  34.  
  35. document.addEventListener('yt-navigate-start', main, false);
  36. main();
  37.  
  38. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址