aboutsummaryrefslogtreecommitdiffstats
path: root/youtube
diff options
context:
space:
mode:
Diffstat (limited to 'youtube')
-rw-r--r--youtube/comments.css3
-rw-r--r--youtube/comments.py7
2 files changed, 8 insertions, 2 deletions
diff --git a/youtube/comments.css b/youtube/comments.css
index baa8ac7..866551e 100644
--- a/youtube/comments.css
+++ b/youtube/comments.css
@@ -98,10 +98,11 @@
word-wrap: break-word;
}
-.comment time{
+.comment .permalink{
grid-column: 3;
grid-row: 1;
white-space: nowrap;
+ color: black;
}
diff --git a/youtube/comments.py b/youtube/comments.py
index 1d96545..efa1b26 100644
--- a/youtube/comments.py
+++ b/youtube/comments.py
@@ -26,7 +26,9 @@ $avatar
<address>
<a class="author" href="$author_url" title="$author">$author</a>
</address>
- <time datetime="$datetime">$published</time>
+ <a class="permalink" href="$permalink" title="permalink">
+ <time datetime="$datetime">$published</time>
+ </a>
<span class="text">$text</span>
<span class="likes">$likes</span>
@@ -277,6 +279,8 @@ def get_comments_html(comments):
action_buttons = '''<a href="''' + delete_url + '''" target="_blank">Delete</a>'''
else:
action_buttons = ''
+
+ permalink = URL_ORIGIN + '/watch?v=' + comment['video_id'] + '&lc=' + comment['comment_id']
html_result += comment_template.substitute(
author=comment['author'],
author_url = URL_ORIGIN + comment['author_url'],
@@ -287,6 +291,7 @@ def get_comments_html(comments):
datetime = '', #TODO
replies = replies,
action_buttons = action_buttons,
+ permalink = permalink,
)
return html_result