mirror of
https://github.com/iv-org/invidious.git
synced 2026-11-03 02:17:16 +00:00
feat: automatically start video and scroll to it if clicking timestamp in comments and description (#6111)
Closes https://github.com/iv-org/invidious/issues/627
This commit is contained in:
@@ -20,6 +20,12 @@
|
||||
e.preventDefault();
|
||||
var time = t.getAttribute('data-jump-time');
|
||||
player.currentTime(time);
|
||||
// The player_html5_api element is the Video.JS player ID.
|
||||
document.getElementById('player_html5_api').scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start'
|
||||
});
|
||||
player.play();
|
||||
break;
|
||||
case 'get_youtube_replies':
|
||||
var load_more = t.getAttribute('data-load-more') !== null;
|
||||
|
||||
Reference in New Issue
Block a user