Youtube polymer engine fixes

Some fixes for Youtube polymer engine

< 脚本Youtube polymer engine fixes的反馈

评价:好评 - 脚本运行良好

§
发表于:2020-06-18

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.

Bogudan作者
§
发表于:2020-06-18

Do you mean player size on default /watch pages in normal mode?

§
发表于:2020-06-18
编辑于:2020-06-18

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.

Bogudan作者
§
发表于:2020-06-18

So you want autodisable theater mode?

§
发表于:2020-06-18

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.

Bogudan作者
§
发表于:2020-06-18

I understood a problem, will try to look into it.

Bogudan作者
§
发表于:2020-06-18

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?

§
发表于:2020-06-19
编辑于:2020-06-19

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.

Bogudan作者
§
发表于:2020-06-19

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.

Bogudan作者
§
发表于:2020-06-20
编辑于:2020-06-20

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.

§
发表于:2020-06-20

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...

发表回复

登录(不可用)以发表回复。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址