diff --git a/assets/js/comments.js b/assets/js/comments.js index ac519388b..0f92d52ab 100644 --- a/assets/js/comments.js +++ b/assets/js/comments.js @@ -83,7 +83,6 @@ function get_youtube_comments() { } else { comments.innerHTML = fallback; } - }; if (video_data.params.comments[1] === 'youtube') @@ -113,10 +112,6 @@ function get_youtube_comments() { contentHtml: response.contentHtml, redditComments: video_data.reddit_comments_text, commentsText: video_data.comments_text.supplant({ - // toLocaleString correctly splits number with local thousands separator. e.g.: - // '1,234,567.89' for user with English locale - // '1 234 567,89' for user with Russian locale - // '1.234.567,89' for user with Portuguese locale commentCount: response.commentCount.toLocaleString() }) }); @@ -126,7 +121,7 @@ function get_youtube_comments() { comments.children[0].children[1].children[0].onclick = swap_comments; } }, - onNon200: onNon200, // declared above + onNon200: onNon200, onError: function (xhr) { comments.innerHTML = spinnerHTML; }, @@ -184,8 +179,7 @@ function get_youtube_replies(target, load_more, load_replies) { body.innerHTML = fallback; }, onTimeout: function (xhr) { - console.warn('Pulling comments failed'); body.innerHTML = fallback; } }); -} \ No newline at end of file +} diff --git a/assets/js/community.js b/assets/js/community.js index 32fe4ebc3..0c6237967 100644 --- a/assets/js/community.js +++ b/assets/js/community.js @@ -25,10 +25,10 @@ function show_youtube_replies(event) { var body = target.parentNode.parentNode.children[1]; body.style.display = ''; - target.innerHTML = sub_text; + target.innerHTML = inner_text; target.onclick = hide_youtube_replies; - target.setAttribute('data-inner-text', inner_text); - target.setAttribute('data-sub-text', sub_text); + target.setAttribute('data-inner-text', sub_text); + target.setAttribute('data-sub-text', inner_text); } function get_youtube_replies(target, load_more) {