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!

发表回复

登录以发表回复。