diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
index 4fdbbb56..4f842c4c 100644
--- a/src/invidious/views/watch.ecr
+++ b/src/invidious/views/watch.ecr
@@ -217,6 +217,13 @@ function get_reddit_comments() {
[ - ] \
{title} \
\
+
\
+ \
+ \
+ View YouTube comments \
+ \
+ \
+
\
\
View more comments on Reddit \
\
@@ -263,6 +270,11 @@ function get_youtube_comments() {
[ - ] \
View {commentCount} comments \
\
+ \
+ \
+ View Reddit comments \
+ \
+ \
\
{contentHtml}
\
'.supplant({
@@ -292,6 +304,19 @@ function get_youtube_comments() {
};
}
+function swap_comments(source) {
+ comments = document.getElementById("comments");
+ var fallback = comments.innerHTML;
+ comments.innerHTML =
+ '
';
+
+ if (source == "youtube") {
+ get_youtube_comments();
+ } else if (source == "reddit") {
+ get_reddit_comments();
+ }
+}
+
function commaSeparateNumber(val){
while (/(\d+)(\d{3})/.test(val.toString())){
val = val.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2');