stylebot icon indicating copy to clipboard operation
stylebot copied to clipboard

Certain buttons are not recognized in the YouTube UI

Open eedo31 opened this issue 1 year ago • 2 comments

I use styleboot mainly to make my UIs cleaner, especially after having already learned shortcuts for certain websites. On YouTube for example, I removed most of the player buttons but apparently only some are removed while others are not, in particular I can't remove the "picture in picture" button (button.ytp-pip-button). The code is the same as the other keys but that one remains visible no matter what I do. Can anyone help me? Maybe I'm doing something wrong?

image

image

Chrome 120.0.6099.225 Win11 23H2 22635.2915

eedo31 avatar Jan 18 '24 17:01 eedo31

This comment is a bit late, but if you're still having the problem:

This is not a bug with stylebot.

The PiP button is from an extension, it's not something from official Youtube. I use the Enhancer for YouTube™ extension, which has this button, and uses a bit of weird styling to make the button.

Image

image

Because it has display: inline-block !important;, and uses a more specific selector, your display: none; is being overridden. To fix this, you need to also have a specific css selector (stylebot automatically adds !important, so you don't need to add it).

This css works for me, and should work for you.

#movie_player div.ytp-chrome-controls button.ytp-pip-button.ytp-button {
  display: none !important;
}

Obsidianninja11 avatar Jun 15 '24 21:06 Obsidianninja11

@Obsidianninja11 Copied, pasted and it works flawlessly. Thanks a lot!

eedo31 avatar Jun 18 '24 15:06 eedo31