youtube icon indicating copy to clipboard operation
youtube copied to clipboard

💡Prevent the "In this video" panel from showing automatically in fullscreen

Open guiohm opened this issue 2 months ago • 1 comments

PROBLEM:

  • Currently, the "In this video" panel opens automatically when we toggle the 'chapters' or 'transcript' on in the Appearence > Sidebar. That's good but it STAYS open when going full screen, which I find very annoying.
  • The shortcuts for chapters and transcript are not toggle switches, they only show the panel but don't hide it.

SOLUTION:
Add option to not show it automatically in fullscreen.

ALTERNATIVES: Allow the existing chapter/transcript shortcuts to hide the panel.

RELEVANCE / SCOPE:

"SIDE EFFECTS":
Not sure

CONTEXT: This happens in Firefox, not tested in other browsers.

Thank you!

guiohm avatar Oct 25 '25 16:10 guiohm

I can confirm this happens in chromium as well, or at the very least, in Vivaldi.

When Appearance → Sidebar → Chapters is enabled it appears when one goes fullscreen.

Seemingly it triggers each time one enters or leaves fullscreen, which in theory is fine, but if there were some way to check if the player is in fullscreen mode, it'd be an easy "if fullscreen then" fix.

I'm no programmer, but I did find that somewhere around line 364-378 in youtube/js&css/web-accessible/www.youtube.com /appearance.js one could check for the value of Document.fullscreenElement to determine whether the player is fullscreen and if so decide not to trigger the event opening chapters.

Here's the source I found it from. If the value of Document.fullscreenElement is null, the youtube player is not in fullscreen.

RedSnt avatar Dec 09 '25 20:12 RedSnt