mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-21 02:18:52 +00:00
Add support for viewing comments without js
Improve stylings
This commit is contained in:
@@ -200,11 +200,15 @@ module Invidious::Routes::Channels
|
||||
prefs = env.get("preferences").as(Preferences)
|
||||
|
||||
locale = prefs.locale
|
||||
region = env.params.query["region"]? || prefs.region
|
||||
|
||||
thin_mode = env.params.query["thin_mode"]? || prefs.thin_mode
|
||||
thin_mode = thin_mode == "true"
|
||||
|
||||
nojs = env.params.query["nojs"]?
|
||||
|
||||
nojs ||= "0"
|
||||
nojs = nojs == "1"
|
||||
|
||||
if !ucid.nil?
|
||||
ucid = ucid.to_s
|
||||
post_response = fetch_channel_community_post(ucid, id, locale, "json", thin_mode)
|
||||
@@ -218,6 +222,11 @@ module Invidious::Routes::Channels
|
||||
end
|
||||
|
||||
post_response = JSON.parse(post_response)
|
||||
|
||||
if nojs
|
||||
comments = Comments.fetch_community_post_comments(ucid, id)
|
||||
comment_html = JSON.parse(Comments.parse_youtube(id, comments, "html", locale, thin_mode, isPost: true))["contentHtml"]
|
||||
end
|
||||
templated "post"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user