Greasy Fork is available in English.

Youtube - toggle related button

Creates a button on the top header to show/hide related section

< Youtube - toggle related buttonについてのフィードバック

レート:良 – スクリプトは良好に動作する

§
投稿日: 2022/08/21

Hello,

Sorry for my ridiculous question, but I wanted to know how to modify the script so that the related section is not hidden automatically please ?

Because on some watch pages it's okay and others watch pages it's not okay for me ; then in these cases I wish to hide the related section.

Thank you for your answer.

Google Chrome Browser with Tampermonkey

barn852作者
§
投稿日: 2022/08/21

Actually that was the original case, I just made it to be hidden by default later. Anyway, the easiest way to do it to change the following two rows:
19. const callback = () => $('#related').hide(); to const callback = () => $('#related').show();
and
40. let hide = true; to let hide = false;

§
投稿日: 2022/08/22

Thank you very much for your answer.

It's works, but unfortunately after modifying the script, you have to click between 2 and several times to show/hide the related videos.

Moreover, the loading of the video pages takes longer with a shifted display of the related videos...

barn852作者
§
投稿日: 2022/08/22

Really? I tested it on both Tampermonkey and Violentmonkey on FF and Chrome and everything works well. Especially I am wondering on the shifted player. Maybe Youtube is testing some new code? It might happen, and they don't apply it right away in every country.

Do my other "right side" scripts work for you?
Do you use some other scripts either (Actually I am running 35 scripts just on YT, but it can happen that one conflicts another).

Anyway, I posted the original code (unlisted) I mentioned before, try it: https://greasyfork.org/en/scripts/449962-youtube-toggle-related

§
投稿日: 2022/08/22
編集日: 2022/08/22

I haven't yet installed any of your other scripts.

Yes, I use other scripts for YouTube.

After having done some tests :

With Youtube - toggle related button :
- the chat always stays there :-)
- the button size is perfect


With Youtube - toggle related original code :
- works perfectly and quickly :-)
- the shifted display of the related videos doesn't appear anymore :-)
- the chat disappears too :-(
- the button is a bit smaller

§
投稿日: 2022/08/22

More screenshots...

barn852作者
§
投稿日: 2022/08/22

Thanks for the detailed feedback.

Yes, the original code was not perfect, I just wanted to know if it works for you (It worked for me, except the button did not show up in some cases). I am happy that the player is no more shifted. I have no clue what was going on. As you can se my conversation with georgetarr22, he experienced today some strange structure either.

Maybe later I can optimize the script for your need with showing the related section by default.

barn852作者
§
投稿日: 2022/08/22

try now the the original code v1.3: https://greasyfork.org/en/scripts/449962-youtube-toggle-related-original
1. corrected selector , so the chat should not disappear anymore.
2. adjusted button size

§
投稿日: 2022/08/22
編集日: 2022/08/22

This is totally perfect and very great.

YouTube - toggle related (original) v1.3 works without problems now.

Thank you very much for your time, your understanding, your kindness and your script ;-)

I'm really happy I found your script which is very useful for me.

返信を投稿

返信を投稿するにはログインしてください。