Youtube - Search While Watching Video

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

< 腳本Youtube - Search While Watching Video的回應

提問/評論

§
發表於:2024-03-02

Request Update:

Change


        function isPlayerAvailable() {
            script.ytplayer = getVideoPlayer();
            return script.ytplayer !== null && script.ytplayer.getVideoData().video_id;
        }

to


        function isPlayerAvailable() {
            script.ytplayer = getVideoPlayer();
            return script.ytplayer && typeof script.ytplayer.getVideoData === 'function' && script.ytplayer.getVideoData().video_id;
        }

getVideoData might be assigned after the DOM element is inserted. At that time, error will occur.

Cptmathix作者
§
發表於:2024-03-02

Thank you for reporting, updated!

發表回覆

登入以回復