Large

YouTube HD Ultimate

By Avindra V.G. Last update Dec 10, 2010 — Installed 402,057 times.

Fit to window off-center for low width windows

in
Subscribe to Fit to window off-center for low width windows 1 post, 1 voice

Uky Scriptwright
FirefoxWindows

For both the latest version 1.1.5 and the previous 1.1.4, there's a black bar to the left of the video player when using "Fit to Window" and the window's width isn't very large. 1.1.3 worked fine and I'd just been sticking to that until YouTube changed the site around today.

Specifically, when I have a browser window with it's window.innerWidth < 981, I get a left margin pushing the right-most edge of the video player off my screen so I have to scroll horizontally to see it.

Playing around with your code a bit, it seems to be center()'s fault in how the marginLeft is being set. I don't really understand the formula of the old 1.1.3 but when I tweak 1.1.5's center() to something similar (window.innerWidth >= 981 ? current 1.1.5 formula : "0") it works properly for me.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel