Greasy Fork is available in English.

Youtube - Search While Watching Video

Search YouTube without interrupting the video, by loading the search results in the related video bar

< Feedback op Youtube - Search While Watching Video

Vraag/Reactie

§
Geplaatst: 11-12-2023
Bijgewerkt: 11-12-2023

Hi Cptmathix,

It's time to update the scripts again.

Recently, YouTube engineers try to extract the non-DOM methods and properties out from the DOM.

You need to change as follow.

  1. add this to the beginning of function youtube_search_while_watching_video()

    const insp = o => o ? (o.polymerController || o.inst || o || 0) : (o || 0);

  2. Inside function resetSuggestions(), replace let data = itemSectionRenderer.__data.data; to let data = insp(itemSectionRenderer).__data.data;

  3. Foresee that this will happen to the player element too. Inside getVideoPlayer(), replace document.getElementById('movie_player'); to insp(document.getElementById('movie_player'));

Remarks

The controller extraction is already implemented to itemSectionRenderer so reset suggestion would not work in the current version 2.4.6 as itemSectionRenderer.__data is undefined

CptmathixMaker
§
Geplaatst: 15-01-2024

Hi CY Fung,

Somehow I don't always get e-mail notifications, so sorry again for the delay.
I've applied your fixes to the script. I also saw that these are the fixes needed to make the Queue script work again.
If you don't mind I would be willing to apply the fixes there too and list the script again. (I'll also credit you)

Have a nice day,
Cptmathix

Yes. Feel free to do so.

Reactie plaatsen

Log in om antwoord te geven.