Zren / ResizeYoutubePlayerToWindowSize

Userscript: Moves the YouTube video to the top of the website and fill the window with the video player.
160 stars 13 forks source link

Theater Mode Toggle in the Settings Cog #66

Closed Zren closed 2 years ago

Zren commented 2 years ago

Youtube is A/B testing moving the theater mode toggle to the settings cog.

First off to fix the video size in "normal mode" before the theater-mode is activated.

                    scriptSelector + ' ytd-watch-flexy[flexy] #player-container-outer.ytd-watch-flexy',
                    scriptSelector + ' ytd-watch-flexy[flexy] #player-container-inner.ytd-watch-flexy',
                    scriptSelector + ' ytd-watch-flexy[flexy] #player-container.ytd-watch-flexy',

To fix the UI, we'll need to toggle the theater mode, which is now more complicated.

Screenshot_20220309_194128

Might be able to fake a t keypress?

The video is moved to another container when in theater mode.

Screenshot_20220309_194907

We might be able to trigger the button.ytp-screen-mode-settings-button with a click.

Screenshot_20220309_195117

Zren commented 2 years ago

Uhg, the miniplayer has the same css class.

I'll use querySelectorAll() and select the second list item.