mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-08 21:52:28 +05:30
Merge f65627f55f
into 70e4eb7f5d
This commit is contained in:
commit
2060711a2d
@ -10,6 +10,14 @@ String.prototype.supplant = function (o) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function updateReplyLinks() {
|
||||||
|
document.querySelectorAll("a[href^='/comment_viewer']").forEach(function (replyLink) {
|
||||||
|
replyLink.setAttribute("href", "javascript:void(0)");
|
||||||
|
replyLink.removeAttribute("target");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
updateReplyLinks();
|
||||||
|
|
||||||
function toggle_comments(event) {
|
function toggle_comments(event) {
|
||||||
var target = event.target;
|
var target = event.target;
|
||||||
var body = target.parentNode.parentNode.parentNode.children[1];
|
var body = target.parentNode.parentNode.parentNode.children[1];
|
||||||
@ -104,6 +112,7 @@ function get_youtube_comments() {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
comments.innerHTML = commentInnerHtml;
|
comments.innerHTML = commentInnerHtml;
|
||||||
|
updateReplyLinks();
|
||||||
comments.children[0].children[0].children[0].onclick = toggle_comments;
|
comments.children[0].children[0].children[0].onclick = toggle_comments;
|
||||||
if (video_data.support_reddit) {
|
if (video_data.support_reddit) {
|
||||||
comments.children[0].children[1].children[0].onclick = swap_comments;
|
comments.children[0].children[1].children[0].onclick = swap_comments;
|
||||||
@ -143,6 +152,7 @@ function get_youtube_replies(target, load_more, load_replies) {
|
|||||||
body = body.parentNode.parentNode;
|
body = body.parentNode.parentNode;
|
||||||
body.removeChild(body.lastElementChild);
|
body.removeChild(body.lastElementChild);
|
||||||
body.insertAdjacentHTML('beforeend', response.contentHtml);
|
body.insertAdjacentHTML('beforeend', response.contentHtml);
|
||||||
|
updateReplyLinks();
|
||||||
} else {
|
} else {
|
||||||
body.removeChild(body.lastElementChild);
|
body.removeChild(body.lastElementChild);
|
||||||
|
|
||||||
@ -161,6 +171,7 @@ function get_youtube_replies(target, load_more, load_replies) {
|
|||||||
|
|
||||||
body.appendChild(p);
|
body.appendChild(p);
|
||||||
body.appendChild(div);
|
body.appendChild(div);
|
||||||
|
updateReplyLinks();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onNon200: function (xhr) {
|
onNon200: function (xhr) {
|
||||||
|
@ -1,37 +1,20 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var community_data = JSON.parse(document.getElementById('community_data').textContent);
|
var community_data = JSON.parse(document.getElementById('community_data').textContent);
|
||||||
|
|
||||||
function hide_youtube_replies(event) {
|
// first page of community posts are loaded without javascript so we need to update the Load more button
|
||||||
var target = event.target;
|
var initialLoadMore = document.querySelector('a[data-onclick="get_youtube_replies"]');
|
||||||
|
initialLoadMore.setAttribute('href', 'javascript:void(0);');
|
||||||
|
initialLoadMore.removeAttribute('target');
|
||||||
|
|
||||||
var sub_text = target.getAttribute('data-inner-text');
|
function updateReplyLinks() {
|
||||||
var inner_text = target.getAttribute('data-sub-text');
|
document.querySelectorAll("a[href^='/comment_viewer']").forEach(function (replyLink) {
|
||||||
|
replyLink.setAttribute("href", "javascript:void(0)");
|
||||||
var body = target.parentNode.parentNode.children[1];
|
replyLink.removeAttribute("target");
|
||||||
body.style.display = 'none';
|
});
|
||||||
|
|
||||||
target.innerHTML = sub_text;
|
|
||||||
target.onclick = show_youtube_replies;
|
|
||||||
target.setAttribute('data-inner-text', inner_text);
|
|
||||||
target.setAttribute('data-sub-text', sub_text);
|
|
||||||
}
|
}
|
||||||
|
updateReplyLinks();
|
||||||
|
|
||||||
function show_youtube_replies(event) {
|
function get_youtube_replies(target) {
|
||||||
var target = event.target;
|
|
||||||
|
|
||||||
var sub_text = target.getAttribute('data-inner-text');
|
|
||||||
var inner_text = target.getAttribute('data-sub-text');
|
|
||||||
|
|
||||||
var body = target.parentNode.parentNode.children[1];
|
|
||||||
body.style.display = '';
|
|
||||||
|
|
||||||
target.innerHTML = sub_text;
|
|
||||||
target.onclick = hide_youtube_replies;
|
|
||||||
target.setAttribute('data-inner-text', inner_text);
|
|
||||||
target.setAttribute('data-sub-text', sub_text);
|
|
||||||
}
|
|
||||||
|
|
||||||
function get_youtube_replies(target, load_more) {
|
|
||||||
var continuation = target.getAttribute('data-continuation');
|
var continuation = target.getAttribute('data-continuation');
|
||||||
|
|
||||||
var body = target.parentNode.parentNode;
|
var body = target.parentNode.parentNode;
|
||||||
@ -47,29 +30,10 @@ function get_youtube_replies(target, load_more) {
|
|||||||
|
|
||||||
helpers.xhr('GET', url, {}, {
|
helpers.xhr('GET', url, {}, {
|
||||||
on200: function (response) {
|
on200: function (response) {
|
||||||
if (load_more) {
|
body = body.parentNode.parentNode;
|
||||||
body = body.parentNode.parentNode;
|
body.removeChild(body.lastElementChild);
|
||||||
body.removeChild(body.lastElementChild);
|
body.insertAdjacentHTML('beforeend', response.contentHtml);
|
||||||
body.innerHTML += response.contentHtml;
|
updateReplyLinks();
|
||||||
} else {
|
|
||||||
body.removeChild(body.lastElementChild);
|
|
||||||
|
|
||||||
var p = document.createElement('p');
|
|
||||||
var a = document.createElement('a');
|
|
||||||
p.appendChild(a);
|
|
||||||
|
|
||||||
a.href = 'javascript:void(0)';
|
|
||||||
a.onclick = hide_youtube_replies;
|
|
||||||
a.setAttribute('data-sub-text', community_data.hide_replies_text);
|
|
||||||
a.setAttribute('data-inner-text', community_data.show_replies_text);
|
|
||||||
a.textContent = community_data.hide_replies_text;
|
|
||||||
|
|
||||||
var div = document.createElement('div');
|
|
||||||
div.innerHTML = response.contentHtml;
|
|
||||||
|
|
||||||
body.appendChild(p);
|
|
||||||
body.appendChild(div);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onNon200: function (xhr) {
|
onNon200: function (xhr) {
|
||||||
body.innerHTML = fallback;
|
body.innerHTML = fallback;
|
||||||
|
@ -279,7 +279,7 @@ def extract_channel_community(items, *, ucid, locale, format, thin_mode, is_sing
|
|||||||
|
|
||||||
if format == "html"
|
if format == "html"
|
||||||
response = JSON.parse(response)
|
response = JSON.parse(response)
|
||||||
content_html = IV::Frontend::Comments.template_youtube(response, locale, thin_mode)
|
content_html = IV::Frontend::Comments.template_youtube(response, locale, thin_mode, ucid, "community")
|
||||||
|
|
||||||
response = JSON.build do |json|
|
response = JSON.build do |json|
|
||||||
json.object do
|
json.object do
|
||||||
|
@ -57,7 +57,7 @@ module Invidious::Comments
|
|||||||
return initial_data
|
return initial_data
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse_youtube(id, response, format, locale, thin_mode, sort_by = "top", is_post = false)
|
def parse_youtube(id, response, format, locale, thin_mode, sort_by = "top", type = "video", ucid = nil)
|
||||||
contents = nil
|
contents = nil
|
||||||
|
|
||||||
if on_response_received_endpoints = response["onResponseReceivedEndpoints"]?
|
if on_response_received_endpoints = response["onResponseReceivedEndpoints"]?
|
||||||
@ -115,7 +115,11 @@ module Invidious::Comments
|
|||||||
json.field "commentCount", comment_count
|
json.field "commentCount", comment_count
|
||||||
end
|
end
|
||||||
|
|
||||||
if is_post
|
if !ucid.nil?
|
||||||
|
json.field "authorId", ucid
|
||||||
|
end
|
||||||
|
|
||||||
|
if type == "post"
|
||||||
json.field "postId", id
|
json.field "postId", id
|
||||||
else
|
else
|
||||||
json.field "videoId", id
|
json.field "videoId", id
|
||||||
@ -302,7 +306,8 @@ module Invidious::Comments
|
|||||||
|
|
||||||
if format == "html"
|
if format == "html"
|
||||||
response = JSON.parse(response)
|
response = JSON.parse(response)
|
||||||
content_html = Frontend::Comments.template_youtube(response, locale, thin_mode)
|
content_html = Frontend::Comments.template_youtube(response, locale, thin_mode, id, type)
|
||||||
|
|
||||||
response = JSON.build do |json|
|
response = JSON.build do |json|
|
||||||
json.object do
|
json.object do
|
||||||
json.field "contentHtml", content_html
|
json.field "contentHtml", content_html
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
module Invidious::Frontend::Comments
|
module Invidious::Frontend::Comments
|
||||||
extend self
|
extend self
|
||||||
|
|
||||||
def template_youtube(comments, locale, thin_mode, is_replies = false)
|
def template_youtube(comments, locale, thin_mode, id, type = "video", is_replies = false)
|
||||||
String.build do |html|
|
String.build do |html|
|
||||||
root = comments["comments"].as_a
|
root = comments["comments"].as_a
|
||||||
root.each do |child|
|
root.each do |child|
|
||||||
@ -13,17 +13,17 @@ module Invidious::Frontend::Comments
|
|||||||
)
|
)
|
||||||
|
|
||||||
replies_html = <<-END_HTML
|
replies_html = <<-END_HTML
|
||||||
<div id="replies" class="pure-g">
|
<div class="pure-g replies">
|
||||||
<div class="pure-u-1-24"></div>
|
<div class="pure-u-1-24"></div>
|
||||||
<div class="pure-u-23-24">
|
<div class="pure-u-23-24">
|
||||||
<p>
|
<p>
|
||||||
<a href="javascript:void(0)" data-continuation="#{child["replies"]["continuation"]}"
|
<a target="_blank" href="/comment_viewer?continuation=#{child["replies"]["continuation"]}&id=#{id}&type=#{type}" data-continuation="#{child["replies"]["continuation"]}"
|
||||||
data-onclick="get_youtube_replies" data-load-replies>#{replies_count_text}</a>
|
data-onclick="get_youtube_replies" data-load-replies>#{replies_count_text}</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
END_HTML
|
END_HTML
|
||||||
elsif comments["authorId"]? && !comments["singlePost"]?
|
elsif comments["authorId"]? && !comments["singlePost"]? && type != "post"
|
||||||
# for posts we should display a link to the post
|
# for posts we should display a link to the post
|
||||||
replies_count_text = translate_count(locale,
|
replies_count_text = translate_count(locale,
|
||||||
"comments_view_x_replies",
|
"comments_view_x_replies",
|
||||||
@ -147,7 +147,12 @@ module Invidious::Frontend::Comments
|
|||||||
|
|
|
|
||||||
END_HTML
|
END_HTML
|
||||||
|
|
||||||
if comments["videoId"]?
|
if type == "post" && !comments["singlePost"]?
|
||||||
|
html << <<-END_HTML
|
||||||
|
<a href="https://www.youtube.com/channel/#{comments["authorId"]}/community?lb=#{id}&lc=#{child["commentId"]}" title="#{translate(locale, "YouTube comment permalink")}">[YT]</a>
|
||||||
|
|
|
||||||
|
END_HTML
|
||||||
|
elsif comments["videoId"]?
|
||||||
html << <<-END_HTML
|
html << <<-END_HTML
|
||||||
<a rel="noreferrer noopener" href="https://www.youtube.com/watch?v=#{comments["videoId"]}&lc=#{child["commentId"]}" title="#{translate(locale, "YouTube comment permalink")}">[YT]</a>
|
<a rel="noreferrer noopener" href="https://www.youtube.com/watch?v=#{comments["videoId"]}&lc=#{child["commentId"]}" title="#{translate(locale, "YouTube comment permalink")}">[YT]</a>
|
||||||
|
|
|
|
||||||
@ -196,7 +201,7 @@ module Invidious::Frontend::Comments
|
|||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<div class="pure-u-1">
|
<div class="pure-u-1">
|
||||||
<p>
|
<p>
|
||||||
<a href="javascript:void(0)" data-continuation="#{comments["continuation"]}"
|
<a target="_blank" href="/comment_viewer?continuation=#{comments["continuation"]}&id=#{id}&type=#{type}" data-continuation="#{comments["continuation"]}"
|
||||||
data-onclick="get_youtube_replies" data-load-more #{"data-load-replies" if is_replies}>#{translate(locale, "Load more")}</a>
|
data-onclick="get_youtube_replies" data-load-more #{"data-load-replies" if is_replies}>#{translate(locale, "Load more")}</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -394,7 +394,7 @@ module Invidious::Routes::API::V1::Channels
|
|||||||
locale = env.get("preferences").as(Preferences).locale
|
locale = env.get("preferences").as(Preferences).locale
|
||||||
|
|
||||||
env.response.content_type = "application/json"
|
env.response.content_type = "application/json"
|
||||||
id = env.params.url["id"].to_s
|
id = URI.encode_www_form(env.params.url["id"].to_s)
|
||||||
ucid = env.params.query["ucid"]?
|
ucid = env.params.query["ucid"]?
|
||||||
|
|
||||||
thin_mode = env.params.query["thin_mode"]?
|
thin_mode = env.params.query["thin_mode"]?
|
||||||
@ -406,9 +406,9 @@ module Invidious::Routes::API::V1::Channels
|
|||||||
if ucid.nil?
|
if ucid.nil?
|
||||||
response = YoutubeAPI.resolve_url("https://www.youtube.com/post/#{id}")
|
response = YoutubeAPI.resolve_url("https://www.youtube.com/post/#{id}")
|
||||||
return error_json(400, "Invalid post ID") if response["error"]?
|
return error_json(400, "Invalid post ID") if response["error"]?
|
||||||
ucid = response.dig("endpoint", "browseEndpoint", "browseId").as_s
|
ucid = URI.encode_www_form(response.dig("endpoint", "browseEndpoint", "browseId").as_s)
|
||||||
else
|
else
|
||||||
ucid = ucid.to_s
|
ucid = URI.encode_www_form(ucid.to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -423,7 +423,7 @@ module Invidious::Routes::API::V1::Channels
|
|||||||
|
|
||||||
env.response.content_type = "application/json"
|
env.response.content_type = "application/json"
|
||||||
|
|
||||||
id = env.params.url["id"]
|
id = URI.encode_www_form(env.params.url["id"])
|
||||||
|
|
||||||
thin_mode = env.params.query["thin_mode"]?
|
thin_mode = env.params.query["thin_mode"]?
|
||||||
thin_mode = thin_mode == "true"
|
thin_mode = thin_mode == "true"
|
||||||
@ -432,15 +432,23 @@ module Invidious::Routes::API::V1::Channels
|
|||||||
format ||= "json"
|
format ||= "json"
|
||||||
|
|
||||||
continuation = env.params.query["continuation"]?
|
continuation = env.params.query["continuation"]?
|
||||||
|
ucid = env.params.query["ucid"]?
|
||||||
|
|
||||||
|
if ucid.nil?
|
||||||
|
response = YoutubeAPI.resolve_url("https://www.youtube.com/post/#{id}")
|
||||||
|
return error_json(400, "Invalid post ID") if response["error"]?
|
||||||
|
ucid = URI.encode_www_form(response.dig("endpoint", "browseEndpoint", "browseId").as_s)
|
||||||
|
else
|
||||||
|
ucid = URI.encode_www_form(ucid.to_s)
|
||||||
|
end
|
||||||
|
|
||||||
case continuation
|
case continuation
|
||||||
when nil, ""
|
when nil, ""
|
||||||
ucid = env.params.query["ucid"]
|
|
||||||
comments = Comments.fetch_community_post_comments(ucid, id)
|
comments = Comments.fetch_community_post_comments(ucid, id)
|
||||||
else
|
else
|
||||||
comments = YoutubeAPI.browse(continuation: continuation)
|
comments = YoutubeAPI.browse(continuation: continuation)
|
||||||
end
|
end
|
||||||
return Comments.parse_youtube(id, comments, format, locale, thin_mode, is_post: true)
|
return Comments.parse_youtube(id, comments, format, locale, thin_mode, type: "post", ucid: ucid)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.channels(env)
|
def self.channels(env)
|
||||||
|
@ -392,7 +392,7 @@ module Invidious::Routes::API::V1::Videos
|
|||||||
|
|
||||||
env.response.content_type = "application/json"
|
env.response.content_type = "application/json"
|
||||||
|
|
||||||
clip_id = env.params.url["id"]
|
clip_id = URI.encode_www_form(env.params.url["id"])
|
||||||
region = env.params.query["region"]?
|
region = env.params.query["region"]?
|
||||||
proxy = {"1", "true"}.any? &.== env.params.query["local"]?
|
proxy = {"1", "true"}.any? &.== env.params.query["local"]?
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ module Invidious::Routes::Channels
|
|||||||
|
|
||||||
def self.post(env)
|
def self.post(env)
|
||||||
# /post/{postId}
|
# /post/{postId}
|
||||||
id = env.params.url["id"]
|
id = URI.encode_www_form(env.params.url["id"])
|
||||||
ucid = env.params.query["ucid"]?
|
ucid = env.params.query["ucid"]?
|
||||||
|
|
||||||
prefs = env.get("preferences").as(Preferences)
|
prefs = env.get("preferences").as(Preferences)
|
||||||
@ -253,14 +253,14 @@ module Invidious::Routes::Channels
|
|||||||
nojs = nojs == "1"
|
nojs = nojs == "1"
|
||||||
|
|
||||||
if !ucid.nil?
|
if !ucid.nil?
|
||||||
ucid = ucid.to_s
|
ucid = URI.encode_www_form(ucid.to_s)
|
||||||
post_response = fetch_channel_community_post(ucid, id, locale, "json", thin_mode)
|
post_response = fetch_channel_community_post(ucid, id, locale, "json", thin_mode)
|
||||||
else
|
else
|
||||||
# resolve the url to get the author's UCID
|
# resolve the url to get the author's UCID
|
||||||
response = YoutubeAPI.resolve_url("https://www.youtube.com/post/#{id}")
|
response = YoutubeAPI.resolve_url("https://www.youtube.com/post/#{id}")
|
||||||
return error_template(400, "Invalid post ID") if response["error"]?
|
return error_template(400, "Invalid post ID") if response["error"]?
|
||||||
|
|
||||||
ucid = response.dig("endpoint", "browseEndpoint", "browseId").as_s
|
ucid = URI.encode_www_form(response.dig("endpoint", "browseEndpoint", "browseId").as_s)
|
||||||
post_response = fetch_channel_community_post(ucid, id, locale, "json", thin_mode)
|
post_response = fetch_channel_community_post(ucid, id, locale, "json", thin_mode)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -268,7 +268,7 @@ module Invidious::Routes::Channels
|
|||||||
|
|
||||||
if nojs
|
if nojs
|
||||||
comments = Comments.fetch_community_post_comments(ucid, id)
|
comments = Comments.fetch_community_post_comments(ucid, id)
|
||||||
comment_html = JSON.parse(Comments.parse_youtube(id, comments, "html", locale, thin_mode, is_post: true))["contentHtml"]
|
comment_html = JSON.parse(Comments.parse_youtube(id, comments, "html", locale, thin_mode, type: "post", ucid: ucid))["contentHtml"]
|
||||||
end
|
end
|
||||||
templated "post"
|
templated "post"
|
||||||
end
|
end
|
||||||
|
@ -332,4 +332,53 @@ module Invidious::Routes::Watch
|
|||||||
return error_template(400, "Invalid label or itag")
|
return error_template(400, "Invalid label or itag")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# used for fetching replies/ fetching more comments when js is disabled.
|
||||||
|
def self.comments(env)
|
||||||
|
locale = env.get("preferences").as(Preferences).locale
|
||||||
|
region = env.params.query["region"]?
|
||||||
|
|
||||||
|
id = URI.encode_www_form(env.params.query["id"])
|
||||||
|
continuation = env.params.query["continuation"]?
|
||||||
|
|
||||||
|
source = env.params.query["source"]? || "youtube"
|
||||||
|
|
||||||
|
thin_mode = env.params.query["thin_mode"]? == "true"
|
||||||
|
comment_type = env.params.query["type"]? || "video"
|
||||||
|
|
||||||
|
parent_comment = nil
|
||||||
|
if comment_type == "community"
|
||||||
|
# community posts
|
||||||
|
comment_html = JSON.parse(fetch_channel_community(id, continuation, locale, "html", thin_mode))["contentHtml"]
|
||||||
|
elsif comment_type == "post"
|
||||||
|
# replies to a community post
|
||||||
|
ucid = env.params.query["ucid"]?
|
||||||
|
if ucid.nil?
|
||||||
|
response = YoutubeAPI.resolve_url("https://www.youtube.com/post/#{id}")
|
||||||
|
return error_json(400, "Invalid post ID") if response["error"]?
|
||||||
|
ucid = URI.encode_www_form(response.dig("endpoint", "browseEndpoint", "browseId").as_s)
|
||||||
|
else
|
||||||
|
ucid = URI.encode_www_form(ucid.to_s)
|
||||||
|
end
|
||||||
|
case continuation
|
||||||
|
when nil, ""
|
||||||
|
comments = Comments.fetch_community_post_comments(ucid, id)
|
||||||
|
else
|
||||||
|
comments = YoutubeAPI.browse(continuation: continuation)
|
||||||
|
end
|
||||||
|
comment_html = JSON.parse(Comments.parse_youtube(id, comments, "html", locale, thin_mode, type: "post", ucid: ucid))["contentHtml"]
|
||||||
|
else
|
||||||
|
# video comments
|
||||||
|
if source == "youtube"
|
||||||
|
comment_html = JSON.parse(Comments.fetch_youtube(id, continuation, "html", locale, thin_mode, region))["contentHtml"]
|
||||||
|
elsif source == "reddit"
|
||||||
|
comments, reddit_thread = Comments.fetch_reddit(id)
|
||||||
|
comment_html = Frontend::Comments.template_reddit(comments, locale)
|
||||||
|
|
||||||
|
comment_html = Comments.fill_links(comment_html, "https", "www.reddit.com")
|
||||||
|
comment_html = Comments.replace_links(comment_html)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
templated "comments_no_js"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -170,6 +170,8 @@ module Invidious::Routing
|
|||||||
|
|
||||||
get "/embed/", Routes::Embed, :redirect
|
get "/embed/", Routes::Embed, :redirect
|
||||||
get "/embed/:id", Routes::Embed, :show
|
get "/embed/:id", Routes::Embed, :show
|
||||||
|
# currently only for fetching continuations when js is disabled.
|
||||||
|
get "/comment_viewer", Routes::Watch, :comments
|
||||||
end
|
end
|
||||||
|
|
||||||
def register_yt_playlist_routes
|
def register_yt_playlist_routes
|
||||||
|
8
src/invidious/views/comments_no_js.ecr
Normal file
8
src/invidious/views/comments_no_js.ecr
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<% content_for "header" do %>
|
||||||
|
<title>Invidious</title>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<!-- basic comments page for people with js disabled. -->
|
||||||
|
<div class="comments post-comments">
|
||||||
|
<%= comment_html %>
|
||||||
|
</div>
|
@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="h-box pure-g comments" id="comments">
|
<div class="h-box pure-g comments" id="comments">
|
||||||
<%= IV::Frontend::Comments.template_youtube(items.not_nil!, locale, thin_mode) %>
|
<%= IV::Frontend::Comments.template_youtube(items.not_nil!, locale, thin_mode, ucid, "community") %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div id="post" class="comments post-comments">
|
<div id="post" class="comments post-comments">
|
||||||
<%= IV::Frontend::Comments.template_youtube(post_response.not_nil!, locale, thin_mode) %>
|
<%= IV::Frontend::Comments.template_youtube(post_response.not_nil!, locale, thin_mode, id, "post") %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if nojs %>
|
<% if nojs %>
|
||||||
|
Loading…
Reference in New Issue
Block a user