YouTube - Remove Download Button

This removes the Download button on the sidebar along with the button on the watch page.

  1. // ==UserScript==
  2. // @name YouTube - Remove Download Button
  3. // @namespace https://greasyfork.org/en/users/933798
  4. // @version 0.2
  5. // @description This removes the Download button on the sidebar along with the button on the watch page.
  6. // @author Magma_Craft
  7. // @license MIT
  8. // @match https://www.youtube.com/*
  9. // @icon https://www.youtube.com/favicon.ico
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. window.setTimeout(
  14. function check() {
  15. if (document.querySelector('[title="Downloads"]')) {
  16. shorts();
  17. }
  18. window.setTimeout(check, 250);
  19. }, 250
  20. );
  21.  
  22. function shorts() {
  23. var node = document.querySelector('[title="Downloads"]');
  24. node.style.display = "none";
  25. }
  26.  
  27. (function() {
  28. 'use strict';
  29. const style = document.createElement('style');
  30. style.type = 'text/css';
  31. style.innerText = 'ytd-menu-service-item-download-renderer{display:none;}';
  32. document.head.appendChild(style);
  33. })();
  34. (function() {
  35. 'use strict';
  36. const style = document.createElement('style');
  37. style.type = 'text/css';
  38. style.innerText = 'ytd-download-button-renderer{display:none;}';
  39. document.head.appendChild(style);
  40. })();