From f13fb80b427f0d1151053c7c20ba37a466538677 Mon Sep 17 00:00:00 2001 From: diogo Date: Sat, 17 Jul 2021 19:43:51 +0200 Subject: [PATCH] scroll the nextVideo into the top --- assets/js/watch.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/js/watch.js b/assets/js/watch.js index 3909edd40..1579abf4e 100644 --- a/assets/js/watch.js +++ b/assets/js/watch.js @@ -149,6 +149,8 @@ function get_playlist(plid, retries) { if (xhr.readyState == 4) { if (xhr.status == 200) { playlist.innerHTML = xhr.response.playlistHtml; + var nextVideo = document.getElementById(xhr.response.nextVideo); + nextVideo.parentNode.parentNode.scrollTop = nextVideo.offsetTop; if (xhr.response.nextVideo) { player.on('ended', function () {