YouTube Old UI

Customizes YouTube page on load

  1. // ==UserScript==
  2. // @name YouTube Old UI
  3. // @namespace https://github.com/JamesCicada
  4. // @version 1.0
  5. // @description Customizes YouTube page on load
  6. // @author JamesCicada
  7. // @match https://www.youtube.com/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. function deletePrimaryElement() {
  16. var primaryElement = document.querySelector('ytd-watch-grid[cinematics-enabled] #primary.ytd-watch-grid');
  17. if (primaryElement) {
  18. primaryElement.parentNode.removeChild(primaryElement);
  19. }
  20. }
  21.  
  22. function modifySecondaryElementStyle() {
  23. var secondaryElement = document.querySelector('ytd-watch-grid[cinematics-enabled] #secondary.ytd-watch-grid');
  24. if (secondaryElement) {
  25. secondaryElement.style.width = '-webkit-fill-available';
  26. }
  27. }
  28.  
  29. // Call the functions
  30. deletePrimaryElement();
  31. modifySecondaryElementStyle();
  32. })();

QingJ © 2025

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