Comment by polotics

7 months ago

create a new folder, put two files there:

manifest.json

containing: { "manifest_version": 3, "name": "Hide YouTube Shorts", "version": "1.0", "description": "Hides YouTube Shorts", "content_scripts": [ { "matches": ["://www.youtube.com/"], "js": ["content.js"] } ] }

and a file named content.js

containing:

function hideShorts() { const shorts = document.querySelectorAll('ytd-rich-shelf-renderer[is-shorts]'); shorts.forEach(short => { short.style.display = 'none'; }); } hideShorts(); const observer = new MutationObserver(hideShorts); observer.observe(document.body, { childList: true, subtree: true });

add the contents of this folder as a chrome extension