top | item 47020962

(no title)

susam | 14 days ago

Thanks for sharing. I realised I have several userscripts I've written over time to tackle web browsing distractions. I found another one and this is probably the most effective for me because it hides Shorts at the CSS level. That means I don't need to rely on setTimeout(..., 1000) to catch elements that get inserted dynamically after the page loads.

  (function () {
    const css = `
      #secondary { display: none }
      .ytd-rich-shelf-renderer { display: none }
    `
    const style = document.createElement('style')
    style.textContent = css
    document.head.appendChild(style)
  })()

discuss

order

No comments yet.