Youtube: expand description and long comments; show all the replies

Video description, long comments and list of subscriptions are expanded automatically; all the replies are shown after pressing "Show more replies" button

< Commentaires sur Youtube: expand description and long comments; show all the replies

Avis: Bon - le script fonctionne correctement

§
Posté le: 2023-08-02

seems like it's not working?

max44Auteur
§
Posté le: 2023-08-02

Working for me, but not working for you because your account got an amended UI, I suppose. Unfortunately, I can fix it only when Youtube desides to apply new UI to my account too.

§
Posté le: 2023-08-02

Sorry, I didn't explain clearly. It seems that only the YouTube description expansion is not working properly.

max44Auteur
§
Posté le: 2023-08-02

Cannot reproduce it. Could you please give me a link to any video where description expansion is not working properly?

§
Posté le: 2023-08-03

I recorded a video and uploaded it to YouTube:
https://youtu.be/eJ5RAJ7_Gck

In the video, you can see that the YouTube description doesn't expand, but the comments can correctly expand in their entirety. (Without installing a script, it is not possible to expand all the comments.)

max44Auteur
§
Posté le: 2023-08-03

I see. My 1st guess was that maybe the language is the reason, but I tried many languages and the script still works. Now I have to check the compatability with other scripts installed in your browser.

P.S. Thank you for the script "Restore Youtube Username", because yt-handles are totally unreadable

§
Posté le: 2023-08-03

I changed the YouTube language setting to English and disabled all other scripts, and the situation remains the same.

max44Auteur
§
Posté le: 2023-08-03

Oh, so the only reason I can imagine is the amended UI.

§
Posté le: 2023-08-07

I think I have identified the problem.

In this line:
btnClick = $("div#description ytd-text-inline-expander tp-yt-paper-button#expand[role='button']:not([hidden=''])");

after that,
btnClick.length will be equal to 0

so the .click() event won't be triggered.


I added this part by myself:

var button = document.querySelector('yt-interaction[id="description-interaction"]');
if (button != null) {
button.click();
}

And it worked fine.
Could you take a look for reference?

max44Auteur
§
Posté le: 2023-08-08

It's a great idea, thank you. I did not hit on this solution. It works for me too, so I replaced my code by yours.

Please check the new version.

§
Posté le: 2023-08-08

thanks

Poster une réponse

Connectez-vous pour poster une réponse.