YouTube Menu Apps Organizer

Move "More from YouTube" apps to the top navigation and remove from the right tab.

  1. // ==UserScript==
  2. // @name YouTube Menu Apps Organizer
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Move "More from YouTube" apps to the top navigation and remove from the right tab.
  6. // @author YourName
  7. // @match *://www.youtube.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. function moveYouTubeApps() {
  15. // Select the right-side menu where YouTube apps are currently placed
  16. let rightMenu = document.querySelector("#sections"); // Adjust based on actual HTML
  17. let topNav = document.querySelector("#top-level-buttons"); // Adjust based on actual HTML
  18.  
  19. if (!rightMenu || !topNav) return;
  20.  
  21. // Look for app links inside the right menu
  22. let appLinks = rightMenu.querySelectorAll("ytd-rich-grid-media"); // Adjust based on actual HTML element
  23.  
  24. appLinks.forEach(app => {
  25. let clonedApp = app.cloneNode(true);
  26. topNav.appendChild(clonedApp);
  27. });
  28.  
  29. // Optionally, remove the original apps from the right menu
  30. rightMenu.remove();
  31. }
  32.  
  33. function waitForMenu() {
  34. let checkExist = setInterval(() => {
  35. if (document.querySelector("#sections") && document.querySelector("#top-level-buttons")) {
  36. clearInterval(checkExist);
  37. moveYouTubeApps();
  38. }
  39. }, 1000);
  40. }
  41.  
  42. waitForMenu();
  43. })();