diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-05-14 08:18:57 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-05-14 08:18:57 -0500 |
| commit | e833ccf309f8a0081d4ddaf8eaf01d875b354bfb (patch) | |
| tree | dd57f8d465cc023d41b334f635489b564f8c3b6a /assets | |
| parent | a4134d30fa4c94b5ce7615229ed7aec4ce4f4993 (diff) | |
| download | invidious-e833ccf309f8a0081d4ddaf8eaf01d875b354bfb.tar.gz invidious-e833ccf309f8a0081d4ddaf8eaf01d875b354bfb.tar.bz2 invidious-e833ccf309f8a0081d4ddaf8eaf01d875b354bfb.zip | |
Fix comments for age-restricted videos
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/watch.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/assets/js/watch.js b/assets/js/watch.js index 4ce31014..46910620 100644 --- a/assets/js/watch.js +++ b/assets/js/watch.js @@ -52,7 +52,9 @@ function hide_youtube_replies(target, inner_text, sub_text) { } var continue_button = document.getElementById('continue'); -continue_button.onclick = continue_autoplay; +if (continue_button) { + continue_button.onclick = continue_autoplay; +} function continue_autoplay(event) { if (event.target.checked) { @@ -122,7 +124,7 @@ function get_playlist(plid, timeouts = 0) { if (xhr.response.nextVideo) { player.on('ended', function () { - var url = new URL('https://example.com/watch?v=' + video_data.next_video); + var url = new URL('https://example.com/watch?v=' + xhr.response.nextVideo); if (video_data.params.autoplay || video_data.params.continue_autoplay) { url.searchParams.set('autoplay', '1'); |
