Profile picture

GustavBylund

+46 (0)73 026 26 86hello@gustavbylund.semaistho

Remove YouTube Shorts from subscription feed

Shorts mostly suck. This bookmarklet hides them!

Bookmarklet

Drag the following link to your bookmark bar!

Remove YT Shorts

Or add this code to a bookmark:

javascript:Array.from(document.querySelectorAll('a#video-title[href^="/shorts/"')).forEach(e=>function e(r,o){return 0<o?e(r.parentNode,o-1):r}(e,5).remove());

Full code available below:

;(function () {
  function getParent(el, levels) {
    // Helper function to go up multiple parentNode levels
    if (levels > 0) {
      return getParent(el.parentNode, levels - 1)
    }
    return el
  }

  Array.from(
    document.querySelectorAll('a#video-title[href^="/shorts/"'),
  ).forEach((el) => getParent(el, 5).remove())
})()