mirror of
https://github.com/goodtube4u/goodtube.git
synced 2025-11-22 10:16:11 +00:00
'Fix'
This commit is contained in:
13
goodtube.js
13
goodtube.js
@@ -50,6 +50,19 @@
|
||||
getParams[decode(arguments[1])] = decode(arguments[2]);
|
||||
});
|
||||
|
||||
// If we're on a playlist, but we don't have a video id in the URL - then get it from the frame API
|
||||
if (typeof getParams['list'] !== 'undefined' && typeof getParams['v'] === 'undefined') {
|
||||
let youtubeFrameAPI = document.getElementById('movie_player');
|
||||
|
||||
if (youtubeFrameAPI && typeof youtubeFrameAPI.getVideoData === 'function') {
|
||||
let videoData = youtubeFrameAPI.getVideoData();
|
||||
|
||||
if (typeof videoData['video_id'] !== 'undefined') {
|
||||
getParams['v'] = videoData['video_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return getParams;
|
||||
}
|
||||
|
||||
|
||||
2
goodtube.min.js
vendored
2
goodtube.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user