Zren / ResizeYoutubePlayerToWindowSize

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

Youtube videos with long titles are now covering the search bar, also regardless of video title length the search bar is inaccessible. #88

Closed jaredanson closed 5 months ago

jaredanson commented 5 months ago

Even if the video has a short title that does not obscure the search bar, it is not clickable and inaccessible for typing. To use the search bar, you're required to exit the video by clicking the home button before accessing it.

JonseyJones commented 5 months ago

I confirm.

krystian3w commented 5 months ago

I got this:

obraz

Maybe hotfix:

#columns.ytd-watch-flexy { margin-top: 45px !important }

So transparent column overlaps the navigation bar.

VoidCruzer commented 5 months ago

Same issue also happening for me. Unable to use search bar with script running started earlier today.

Zren commented 5 months ago

For some reason ytd-page-manager#page-manager { margin-top: 56px; } isn't moving the div. The browser detects the margin, but that margin overlays the video.

#page-manager.ytd-app {
  margin-top: var(--ytd-masthead-height,var(--ytd-toolbar-height)); /* = 56px */
}

If I add #content { padding-top: 0px; } it does nothing, but if I add #content { padding-top: 1px; } it moves the thing by 56px + 1px for some reason.

If I add #page-manager.ytd-app { padding-top: 56px; } then it works too. Something is fucked here, but I've no clue what.

I'll just add the following to make it work.

#page-manager.ytd-app {
  padding-top: var(--ytd-masthead-height,var(--ytd-toolbar-height));
}
Zren commented 5 months ago

Also it seems like my 56 + 15px = 71px padding isn't working either.

html:not([fullscreen="true"]) body.ytwp-window-player:not(.enhancer-for-youtube-pinned-player) ytd-watch-flexy, html:not([fullscreen="true"]) body.ytwp-window-player:not(.enhancer-for-youtube-pinned-player) ytd-watch-grid {
    padding-top: 71px;
}
Zren commented 5 months ago

v139 should fix it for now, but the underlying issue of why some margin/padding top CSS properties is still there since I don't understand why the browser (Firefox and Chromium) is ignoring them.