From 2d1794889aa3591b31a62f325a0c11a8553ba2d9 Mon Sep 17 00:00:00 2001 From: Umimaso Date: Mon, 21 Jun 2021 00:56:26 +0100 Subject: feat: autoplay for related videos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add autoplay support for related videos. Move the playlist autoplay code into this shared script. Add the SameSite=Strict attribute to the autoplay cookie due to Firefox soon rejecting cookies which use SameSite=None without the secure attribute. Closes: #50 Signed-off-by: Jesús --- youtube/templates/watch.html | 262 ++++++++++++++++++++++++------------------- 1 file changed, 144 insertions(+), 118 deletions(-) (limited to 'youtube/templates') diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html index 0b61f92..47880b8 100644 --- a/youtube/templates/watch.html +++ b/youtube/templates/watch.html @@ -150,124 +150,42 @@ {% if playlist %} -
-
-

{{ playlist['title'] }}

- -
- - {% if playlist['current_index'] is not none %} - - {% endif %} - {% if playlist['id'] is not none %} - - {% endif %} -
+ // @license-end + + {% endif %} + + {% elif settings.related_videos_mode != 0 %} + + {% endif %} + + {% if settings.related_videos_mode != 0 or playlist %} + {% endif %} -- cgit v1.2.3