From 753f6c5389be82f4a17dafb1698e2f65388d35b6 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Fri, 18 Sep 2020 17:32:28 -0700 Subject: Jump video to timestamp in description or comments --- youtube/templates/comments.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'youtube/templates/comments.html') diff --git a/youtube/templates/comments.html b/youtube/templates/comments.html index 396852a..f2cdf65 100644 --- a/youtube/templates/comments.html +++ b/youtube/templates/comments.html @@ -1,6 +1,6 @@ {% import "common_elements.html" as common_elements %} -{% macro render_comment(comment, include_avatar) %} +{% macro render_comment(comment, include_avatar, timestamp_links=False) %}
@@ -14,7 +14,11 @@ - {{ common_elements.text_runs(comment['text']) }} + {% if timestamp_links %} + {{ common_elements.text_runs(comment['text'])|timestamps|safe }} + {% else %} + {{ common_elements.text_runs(comment['text']) }} + {% endif %}
@@ -36,7 +40,7 @@
{% for comment in comments_info['comments'] %} - {{ render_comment(comment, comments_info['include_avatars']) }} + {{ render_comment(comment, comments_info['include_avatars'], True) }} {% endfor %}
{% if 'more_comments_url' is in comments_info %} -- cgit v1.2.3