summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorAndrew Zhao <azhao12345@users.noreply.github.com>2021-03-18 01:23:32 -0400
committerAndrew Zhao <azhao12345@users.noreply.github.com>2021-03-20 00:43:12 -0400
commit89fd35e02d0e8de585c3f5d619fb45986ac1173a (patch)
tree24b869c1478146efb5c08ed40f34270ac6fcbc89 /assets
parent3286328de4cd64b48265b42333bfa67346b7a0b9 (diff)
downloadinvidious-89fd35e02d0e8de585c3f5d619fb45986ac1173a.tar.gz
invidious-89fd35e02d0e8de585c3f5d619fb45986ac1173a.tar.bz2
invidious-89fd35e02d0e8de585c3f5d619fb45986ac1173a.zip
fix comment replies
Diffstat (limited to 'assets')
-rw-r--r--assets/js/handlers.js3
-rw-r--r--assets/js/watch.js7
2 files changed, 7 insertions, 3 deletions
diff --git a/assets/js/handlers.js b/assets/js/handlers.js
index b3da8d9b..1498f39a 100644
--- a/assets/js/handlers.js
+++ b/assets/js/handlers.js
@@ -22,7 +22,8 @@
break;
case 'get_youtube_replies':
var load_more = e.getAttribute('data-load-more') !== null;
- get_youtube_replies(e, load_more);
+ var load_replies = e.getAttribute('data-load-replies') !== null;
+ get_youtube_replies(e, load_more, load_replies);
break;
case 'toggle_parent':
toggle_parent(e);
diff --git a/assets/js/watch.js b/assets/js/watch.js
index eb493bf3..3909edd4 100644
--- a/assets/js/watch.js
+++ b/assets/js/watch.js
@@ -359,7 +359,7 @@ function get_youtube_comments(retries) {
xhr.send();
}
-function get_youtube_replies(target, load_more) {
+function get_youtube_replies(target, load_more, load_replies) {
var continuation = target.getAttribute('data-continuation');
var body = target.parentNode.parentNode;
@@ -371,7 +371,10 @@ function get_youtube_replies(target, load_more) {
'?format=html' +
'&hl=' + video_data.preferences.locale +
'&thin_mode=' + video_data.preferences.thin_mode +
- '&continuation=' + continuation;
+ '&continuation=' + continuation
+ if (load_replies) {
+ url += '&action=action_get_comment_replies';
+ }
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.timeout = 10000;