upvote
Here is another one I found in my personal userscripts:

  // ==UserScript==
  // @name  No YT Sidebar
  // @match https://www.youtube.com/*
  // ==/UserScript==
  function noYTSidebar () {
    if (document.getElementById('secondary') === null) {
      window.setTimeout(noYTSidebar, 1000)
    } else {
      document.getElementById('secondary').style.display = 'none'
    }
  }
  noYTSidebar()
reply