summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>2023-09-26 19:05:37 -0400
committerChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>2023-09-27 17:36:06 -0400
commit4f25069f55b5ee87bb214a975d97522155bffc2c (patch)
treedfc8d126a80c869c1bc11d0d39d5f525fc95fbc8
parentbb04bcc42c1b135aaf50de8799264f86bc42f4db (diff)
downloadinvidious-4f25069f55b5ee87bb214a975d97522155bffc2c.tar.gz
invidious-4f25069f55b5ee87bb214a975d97522155bffc2c.tar.bz2
invidious-4f25069f55b5ee87bb214a975d97522155bffc2c.zip
remove unused variable
simplify resolve url remove trailing spaces Co-Authored-By: Samantaz Fox <coding@samantaz.fr>
-rw-r--r--assets/js/comments.js2
-rw-r--r--src/invidious/routes/api/v1/channels.cr1
-rw-r--r--src/invidious/routes/api/v1/misc.cr4
3 files changed, 3 insertions, 4 deletions
diff --git a/assets/js/comments.js b/assets/js/comments.js
index 00a8cae9..35ffa96e 100644
--- a/assets/js/comments.js
+++ b/assets/js/comments.js
@@ -131,7 +131,7 @@ function get_youtube_replies(target, load_more, load_replies) {
'&hl=' + video_data.preferences.locale +
'&thin_mode=' + video_data.preferences.thin_mode +
'&continuation=' + continuation;
-
+
if (video_data.ucid) {
url += '&ucid=' + video_data.ucid
}
diff --git a/src/invidious/routes/api/v1/channels.cr b/src/invidious/routes/api/v1/channels.cr
index a5ae16a8..67018660 100644
--- a/src/invidious/routes/api/v1/channels.cr
+++ b/src/invidious/routes/api/v1/channels.cr
@@ -373,7 +373,6 @@ module Invidious::Routes::API::V1::Channels
def self.post_comments(env)
locale = env.get("preferences").as(Preferences).locale
- region = env.params.query["region"]?
env.response.content_type = "application/json"
diff --git a/src/invidious/routes/api/v1/misc.cr b/src/invidious/routes/api/v1/misc.cr
index 5dfc4afa..8a92e160 100644
--- a/src/invidious/routes/api/v1/misc.cr
+++ b/src/invidious/routes/api/v1/misc.cr
@@ -173,8 +173,8 @@ module Invidious::Routes::API::V1::Misc
end
JSON.build do |json|
json.object do
- json.field "ucid", sub_endpoint["browseId"].try &.as_s if sub_endpoint["browseId"]?
- json.field "videoId", sub_endpoint["videoId"].try &.as_s if sub_endpoint["videoId"]?
+ json.field "ucid", sub_endpoint["browseId"].as_s if sub_endpoint["browseId"]?
+ json.field "videoId", sub_endpoint["videoId"].as_s if sub_endpoint["videoId"]?
json.field "params", params.try &.as_s
json.field "pageType", pageType
end