From debc11931fe1102f17852fd082d0dac50d477ce9 Mon Sep 17 00:00:00 2001
From: zrose584 <57181548+zrose584@users.noreply.github.com>
Date: Wed, 7 Oct 2020 19:03:22 +0200
Subject: add comments.js
---
youtube/templates/comments.html | 9 ++++++++-
youtube/templates/comments_page.html | 25 +++++++++++++++----------
youtube/templates/watch.html | 18 +++++++++++++++++-
3 files changed, 40 insertions(+), 12 deletions(-)
(limited to 'youtube/templates')
diff --git a/youtube/templates/comments.html b/youtube/templates/comments.html
index f2cdf65..9d93b8c 100644
--- a/youtube/templates/comments.html
+++ b/youtube/templates/comments.html
@@ -22,7 +22,14 @@
{{ comment['likes_text'] if comment['like_count'] else ''}}
-
{{ comment['view_replies_text'] }}
+ {% if settings.use_comments_js and comment['reply_count'] %}
+
+ {{ comment['view_replies_text'] }}
+
+
+ {% else %}
+
{{ comment['view_replies_text'] }}
+ {% endif %}
{% if 'delete_url' is in comment %}
Delete
{% endif %}
diff --git a/youtube/templates/comments_page.html b/youtube/templates/comments_page.html
index 047404a..2984f1e 100644
--- a/youtube/templates/comments_page.html
+++ b/youtube/templates/comments_page.html
@@ -1,13 +1,16 @@
{% set page_title = ('Replies' if comments_info['is_replies'] else 'Comments page ' + comments_info['page_number']) %}
-{% extends "base.html" %}
-{% import "comments.html" as comments %}
+{% import "comments.html" as comments with context %}
-{% block style %}
- .comments-area{
- margin: auto;
- width:640px;
- }
-{% endblock style %}
+{% if not slim %}
+ {% extends "base.html" %}
+
+ {% block style %}
+ .comments-area{
+ margin: auto;
+ width:640px;
+ }
+ {% endblock style %}
+{% endif %}
{% block main %}
@@ -24,7 +27,9 @@
{% endif %}
- {{ comments.comment_posting_box(comment_posting_box_info) }}
+ {% if not slim %}
+ {{ comments.comment_posting_box(comment_posting_box_info) }}
+ {% endif %}
{% if not comments_info['is_replies'] %}