|
|
@ -205,19 +205,18 @@ function get_reddit_comments() {
|
|
|
|
if (xhr.readyState == 4)
|
|
|
|
if (xhr.readyState == 4)
|
|
|
|
if (xhr.status == 200) {
|
|
|
|
if (xhr.status == 200) {
|
|
|
|
comments = document.getElementById("comments");
|
|
|
|
comments = document.getElementById("comments");
|
|
|
|
comments.innerHTML = `
|
|
|
|
comments.innerHTML = ' \
|
|
|
|
<div>
|
|
|
|
<div> \
|
|
|
|
<h3>
|
|
|
|
<h3> \
|
|
|
|
<a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a>
|
|
|
|
<a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a> \
|
|
|
|
{title}
|
|
|
|
{title} \
|
|
|
|
</h3>
|
|
|
|
</h3> \
|
|
|
|
<b>
|
|
|
|
<b> \
|
|
|
|
<a target="_blank" href="https://reddit.com{permalink}">View more comments on Reddit</a>
|
|
|
|
<a target="_blank" href="https://reddit.com{permalink}">View more comments on Reddit</a> \
|
|
|
|
</b>
|
|
|
|
</b> \
|
|
|
|
</div>
|
|
|
|
</div> \
|
|
|
|
<div>{contentHtml}</div>
|
|
|
|
<div>{contentHtml}</div> \
|
|
|
|
|
|
|
|
<hr>'.supplant({
|
|
|
|
<hr>`.supplant({
|
|
|
|
|
|
|
|
title: xhr.response.title,
|
|
|
|
title: xhr.response.title,
|
|
|
|
permalink: xhr.response.permalink,
|
|
|
|
permalink: xhr.response.permalink,
|
|
|
|
contentHtml: xhr.response.contentHtml
|
|
|
|
contentHtml: xhr.response.contentHtml
|
|
|
@ -252,15 +251,15 @@ function get_youtube_comments() {
|
|
|
|
if (xhr.status == 200) {
|
|
|
|
if (xhr.status == 200) {
|
|
|
|
comments = document.getElementById("comments");
|
|
|
|
comments = document.getElementById("comments");
|
|
|
|
if (xhr.response.commentCount > 0) {
|
|
|
|
if (xhr.response.commentCount > 0) {
|
|
|
|
comments.innerHTML = `
|
|
|
|
comments.innerHTML = ' \
|
|
|
|
<div>
|
|
|
|
<div> \
|
|
|
|
<h3>
|
|
|
|
<h3> \
|
|
|
|
<a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a>
|
|
|
|
<a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a> \
|
|
|
|
View {commentCount} comments
|
|
|
|
View {commentCount} comments \
|
|
|
|
</h3>
|
|
|
|
</h3> \
|
|
|
|
</div>
|
|
|
|
</div> \
|
|
|
|
<div>{contentHtml}</div>
|
|
|
|
<div>{contentHtml}</div> \
|
|
|
|
<hr>`.supplant({
|
|
|
|
<hr>'.supplant({
|
|
|
|
contentHtml: xhr.response.contentHtml,
|
|
|
|
contentHtml: xhr.response.contentHtml,
|
|
|
|
commentCount: commaSeparateNumber(xhr.response.commentCount)
|
|
|
|
commentCount: commaSeparateNumber(xhr.response.commentCount)
|
|
|
|
});
|
|
|
|
});
|
|
|
|