Skip to content

Instantly share code, notes, and snippets.

@Eklei
Last active June 12, 2020 01:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Eklei/2939771b655dbd02cadd1057ea215ac2 to your computer and use it in GitHub Desktop.
Save Eklei/2939771b655dbd02cadd1057ea215ac2 to your computer and use it in GitHub Desktop.
YouTube cleanup. Makes masthead stay put at the top of the page instead of following you down. Embiggens theater mode player to be like an actual video player. Auto-expands YouTube comments. Manages skeleton theater.
@-moz-document domain("youtube.com") {
/*
YouTube has a skeleton theater. Spooky scary skeletons lurk before the page fully loads.
YouTube, probably: http://www.prequeladventure.com/this/story2068.gif
*/
button[title="Play on TV"] { /*Chrome get this garbage out of here.*/
display: none !important;
}
#search-form input#search { /*Chrome intelligently selects a dynamic default foreground color based on background color. Firefox doesn't.*/
color: #ffffffe0; /*Not !important, since we're just supplementing a browser default.*/
}
html[style] {
overflow-x: auto !important;
overflow-y: scroll !important;
}
html[style] body {
overflow: visible !important;
}
#masthead-container {
position: static !important;
}
#page-manager.ytd-app {
margin-top: 0 !important;
}
ytd-masthead.shell, /*SPOOKY*/
ytd-masthead > #container.ytd-masthead {
height: 48px !important;
}
ytd-expander.ytd-comment-renderer > .ytd-expander {
max-height: none !important;
overflow: visible !important;
}
ytd-expander.ytd-comment-renderer > paper-button > .more-button {
display: none !important;
}
#player.skeleton.theater, /*SPOOKY*/
ytd-watch-flexy[theater] #player-theater-container {
height: calc(100vh - 48px) !important;
min-height: 0 !important;
max-height: none !important;
overflow: hidden !important;
}
#player.skeleton.theater #player-api{ /*SPOOKY*/
box-sizing: border-box !important;
padding-top: 39px !important;
background-color: black !important;
}
ytd-watch-flexy[theater] .html5-video-player:not(.ytp-fullscreen):not(.ytp-small-mode) {
height: calc(100% - 39px) !important;
overflow: visible !important;
}
ytd-watch-flexy[theater] .html5-video-player:not(.ytp-fullscreen):not(.ytp-small-mode) .annotation.iv-branding,
ytd-watch-flexy[theater] .html5-video-player:not(.ytp-fullscreen):not(.ytp-small-mode) .ytp-chrome-bottom {
bottom: -39px !important;
}
ytd-watch-flexy[theater] .html5-video-player:not(.ytp-fullscreen):not(.ytp-small-mode) .ytp-tooltip.ytp-bottom,
ytd-watch-flexy[theater] .html5-video-player:not(.ytp-fullscreen):not(.ytp-small-mode) .ytp-settings-menu {
margin-top: 39px !important;
margin-bottom: -39px !important;
}
#player.skeleton.theater { /*SPOOKY*/
margin-top: 48px !important;
}
ytd-watch-flexy[theater] .html5-video-player.ytp-small-mode:not(.ytp-fullscreen)[style*="right"][style*="bottom"] {
width: 448px !important; /*Iridium corner video: embiggen.*/
height: 252px !important;
}
#player.skeleton.theater .html5-video-player:not(.ytp-small-mode){ /*SPOOKY*/
overflow: visible !important;
}
#player.skeleton.theater .html5-video-container video{ /*SPOOKY*/
margin-top: -39px !important;
}
ytd-watch-flexy[theater] .html5-video-player:not(.ytp-fullscreen):not(.ytp-small-mode) .ytp-gradient-bottom {
display: none !important;
}
ytd-sentiment-bar-renderer {
padding-top: 0px;
}
#container.ytd-sentiment-bar-renderer,
#like-bar.ytd-sentiment-bar-renderer {
height: 8px !important;
}
yt-formatted-string:focus {
outline: none !important;
}
ytd-watch-flexy[theater] .html5-endscreen {
height: 100% !important;
}
}
@leeterry
Copy link

Thanks, always found the youtube bar scrolling with you to be an annoyance and was looking for a long time for a way to get it pinned in place. I had found this but kept looking since I did not have any addons installed to handle .css files and didnt wanna find 1 if I could help it but after hrs of searching I gave up and just installed Stylus so I could use this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment