YouTube: Force Single Column Mode

8/17/2023, 1:51:20 AM

当前为 2023-08-16 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name YouTube: Force Single Column Mode
  3. // @namespace UserScripts
  4. // @match https://www.youtube.com/*
  5. // @grant none
  6. // @version 1.0
  7. // @author CY Fung
  8. // @description 8/17/2023, 1:51:20 AM
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12.  
  13. (() => {
  14.  
  15. setInterval(() => {
  16. let ytdWatchFlexy = document.querySelector('ytd-watch-flexy[is-two-columns_]:not([hidden])');
  17. if (ytdWatchFlexy) {
  18. ytdWatchFlexy.removeAttribute('is-two-columns_')
  19.  
  20. }
  21.  
  22.  
  23. }, 1)
  24.  
  25. })();