|
@@ -44,7 +44,7 @@ lastVideoId = videoId; |
|
|
if (videoId)
|
|
|
if (videoId)
|
|
|
{
|
|
|
{
|
|
|
console.log (comments = (await fetch(`/api/v1/videos/${videoId}/comment-threads?count=100&sort=-createdAt`)
|
|
|
console.log (comments = (await fetch(`/api/v1/videos/${videoId}/comment-threads?count=100&sort=-createdAt`)
|
|
|
.then(response => response.ok && response.json ())).data);
|
|
|
|
|
|
|
|
|
.then(response => response.ok && response.json ())).data.map (e => e.text).filter (e => (0 <= +e[0]) && (+e[0] <= 9) && ((e.match (/\//g) || []).length >= 3)).map (e => (([time, lang, style, ...contentParts]) => ({time: (([m, s]) => m * 60 + (+s)) (time.split (':')), lang, style, content: contentParts.join ('/')})) (e.split ('/'))).sort ((a, b) => a.time < b.time ? -1 : 1) );
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|