diff options
| author | diogo <diogo@riddleandcode.com> | 2021-07-17 19:43:51 +0200 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2021-10-11 23:43:41 +0200 |
| commit | f13fb80b427f0d1151053c7c20ba37a466538677 (patch) | |
| tree | da162d27dd0edf08fb394224e6f55c1dbaad4a90 /assets | |
| parent | 0a9e19646afad11bccfba5430ed526178952d479 (diff) | |
| download | invidious-f13fb80b427f0d1151053c7c20ba37a466538677.tar.gz invidious-f13fb80b427f0d1151053c7c20ba37a466538677.tar.bz2 invidious-f13fb80b427f0d1151053c7c20ba37a466538677.zip | |
scroll the nextVideo into the top
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/watch.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/assets/js/watch.js b/assets/js/watch.js index 3909edd4..1579abf4 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 () { |
