Skip to content

Instantly share code, notes, and snippets.

@PeteHaughie
Created August 21, 2025 09:09
Show Gist options
  • Select an option

  • Save PeteHaughie/3468815fba32901c4730a22956f01908 to your computer and use it in GitHub Desktop.

Select an option

Save PeteHaughie/3468815fba32901c4730a22956f01908 to your computer and use it in GitHub Desktop.
Hide YouTube Shorts from feed
// ==UserScript==
// @name Remove YouTube Shorts
// @namespace http://tampermonkey.net/
// @version 2025-08-21
// @description Despite repeatedly telling YouTube I don't want to see Shorts in my feed it keeps shoving them down my throat
// @author Pete Haughie
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Why is this appending a style?
// YT is creating a web component which is appended AFTER tampermonkey can grab the document so we just hide it from view instead of removing it from the DOM
const style = "grid-shelf-view-model { display: none !important;}";
const styles = document.createElement("style");
styles.innerText = style;
document.head.appendChild(styles);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment