Some fixes for Youtube polymer engine
< Părere la script-ul Youtube polymer engine fixes
Do you mean player size on default /watch pages in normal mode?
Yes! Currently with privacy.resistFingerprinting:true the player looks like a theater mode. Need like on old layout with videos on right side (640x360).
It looks now like this:
https://imgshare.io/image/N56EZ6
All videos are below.
So you want autodisable theater mode?
This is not a theater mode. Theater mode have black background. When browser work in privacy.resistFingerprinting:true then Firefox opened his window with 1000x891. So Youtube Polymer make this big player size (like theatre mode). On old layout this not hapens.
https://imgshare.io/image/N5Nt35
I want a player size like on old layout.
I understood a problem, will try to look into it.
Unfortunately, i can't reproduce it in my environment :(
Therefore 2 more questions for now:
1) does described behaviour happens without script or only when script enabled?
2) does suggested videos below comments section?
1: In both cases. It does when youtube not in fullscreen. Just reduce your browser window size to 1000x891 and see the problem.
2: Nope. https://imgshare.io/image/N52wxP
Version 0.2 not help. Still same. Do not trouble yourself. I see that for the script to work properly, you need access to local storage and cookies. I`m hardening my browser so both is disabled. I don't want to waste your time.
LS & cookies required only for settings save. And new option disabled by default, therefore no visible changes for 0.2.
I'll look again into this thing later, but looks like it's not player size related.
Well... It's possible to implement, but i'm not currently ready for this ammount of work.
TL;DR
Technical information about what's happening
Page layout in normal vide mode on wide (1k+px) window organized following way:
div#columns -- all info + div#primary & div#primary-inner -- left panel | + div#player -- player | + ... | + ytd-comments#comments -- comments + div#secondary & div#secondary-inner -- right panel + ... + div#related -- video recommendations
There are multiple things happen when window width goes below 1k:
1) different set of CSS rules for some elements (mostly for player, but also hides div#secondary)
2) window resize event handler that moves items from div#secondary-inner into div#primary-inner in specific order
Main problem for me is 2nd: there is no point overriding window.innerWidth or even it's getter after events attached. Therefore it's either must be done at @document-start (currently i'm not ready to rewrite script under this position) or move items back by hand in self-written resize handler.
Bro, dont waste your time on me. The main thing you tried. I rewrite one of the Firefox addons and can still run youtube in old layout. Until they block this method...
Excellent beginning. Can you add change the size of the player 640x360 like in old layout? Because on a polymer with using pref privacy.resistFingerprinting:true it is too big and closes most of the page.