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:
Fijxu
2026-11-01 23:43:58 -03:00
committed by GitHub
parent 5cd55001fa
commit 537af4a401

View File

@@ -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;