This extension is a bare minimum Javascript function injected into the page, with the purpose of hiding all YouTube shorts.
When installed it will execute the following code; both following page load, and whenever the extension icon is clicked.
(function() {
document.querySelectorAll('[href*="shorts"]').forEach(function(elem){elem.parentElement.parentElement.parentElement.style.display='none'});
})();
- The script will not run against any pages except for: https://www.youtube.com/feed/subscriptions
- New shorts will render into the DOM when scrolling down and loading additional thumbnails. Currently this requires another execution via extension icon to hide those elements.
- Extension isn't triggered when navigating to the Feeds tab from YouTube homepage.
- Marek (Idea and Javascript)
- Lawrence Lagerlof (Extension Boilerplate)