|
|
@ -379,7 +379,7 @@ function get_youtube_comments() {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function get_youtube_replies(target) {
|
|
|
|
function get_youtube_replies(target, load_more) {
|
|
|
|
var continuation = target.getAttribute('data-continuation');
|
|
|
|
var continuation = target.getAttribute('data-continuation');
|
|
|
|
|
|
|
|
|
|
|
|
var body = target.parentNode.parentNode;
|
|
|
|
var body = target.parentNode.parentNode;
|
|
|
@ -398,13 +398,19 @@ function get_youtube_replies(target) {
|
|
|
|
xhr.onreadystatechange = function() {
|
|
|
|
xhr.onreadystatechange = function() {
|
|
|
|
if (xhr.readyState == 4) {
|
|
|
|
if (xhr.readyState == 4) {
|
|
|
|
if (xhr.status == 200) {
|
|
|
|
if (xhr.status == 200) {
|
|
|
|
body.innerHTML = ' \
|
|
|
|
if (load_more) {
|
|
|
|
<p><a href="javascript:void(0)" \
|
|
|
|
body = body.parentNode.parentNode;
|
|
|
|
onclick="hide_youtube_replies(this)">Hide replies \
|
|
|
|
body.removeChild(body.lastElementChild);
|
|
|
|
</a></p> \
|
|
|
|
body.innerHTML += xhr.response.contentHtml;
|
|
|
|
<div>{contentHtml}</div>'.supplant({
|
|
|
|
} else {
|
|
|
|
contentHtml: xhr.response.contentHtml,
|
|
|
|
body.innerHTML = ' \
|
|
|
|
});
|
|
|
|
<p><a href="javascript:void(0)" \
|
|
|
|
|
|
|
|
onclick="hide_youtube_replies(this)">Hide replies \
|
|
|
|
|
|
|
|
</a></p> \
|
|
|
|
|
|
|
|
<div>{contentHtml}</div>'.supplant({
|
|
|
|
|
|
|
|
contentHtml: xhr.response.contentHtml,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
body.innerHTML = fallback;
|
|
|
|
body.innerHTML = fallback;
|
|
|
|
}
|
|
|
|
}
|
|
|
|