Greasy Fork is available in English.

Youtube - hide "Download, Clip and Thanks (including Promote)" buttons

Hides "Download", "Clip", "Thanks" and "Promote" buttons on video. (special thanks to aubymori for the old version of the script)

  1. // ==UserScript==
  2. // @name Youtube - hide "Download, Clip and Thanks (including Promote)" buttons
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.5
  5. // @description Hides "Download", "Clip", "Thanks" and "Promote" buttons on video. (special thanks to aubymori for the old version of the script)
  6. // @author Magma_Craft
  7. // @match *://www.youtube.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12. const rctStyle = document.createElement("style");
  13. rctStyle.innerHTML = `
  14. ytd-download-button-renderer {
  15. display: none !important;
  16. }
  17.  
  18. #flexible-item-buttons [aria-label="Promote"] {
  19. display: none !important;
  20. }
  21.  
  22. #flexible-item-buttons [aria-label="Clip"] {
  23. display: none !important;
  24. }
  25.  
  26. #flexible-item-buttons [aria-label="Thanks"],
  27. #flexible-item-buttons [title="Show support with Super Thanks"] {
  28. display: none !important;
  29. }
  30. `;
  31. document.getElementsByTagName("head")[0].appendChild(rctStyle);
  32. async function waitForElm(q) {
  33. while (document.querySelector(q) == null) {
  34. await new Promise(r => requestAnimationFrame(r));
  35. };
  36. return document.querySelector(q);
  37. };
  38. document.addEventListener("yt-page-data-updated", () => {
  39. waitForElm("#top-level-buttons-computed.ytd-menu-renderer").then((btns) => {
  40. var abList = btns.querySelectorAll("ytd-button-renderer");
  41. for(i = 0; i < abList.length; i++) {
  42. if (abList[i].data.icon.iconType == "MONEY_HEART" || abList[i].data.icon.iconType == "CONTENT_CUT") {
  43. abList[i].remove();
  44. }
  45. }
  46. });
  47. });