mirror of
https://github.com/iv-org/invidious.git
synced 2025-07-14 17:38:29 +00:00
Revert "Incorporate unused "unable to load comments" message": Split these changes to another PR
This reverts commit 5451391502
.
This commit is contained in:
parent
5451391502
commit
88e80d50ad
@ -106,8 +106,8 @@ function get_youtube_comments() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onNon200: video_data.params.comments[1] === 'youtube'
|
onNon200: video_data.params.comments[1] === 'youtube'
|
||||||
? function (xhr) {}
|
? function (xhr) {}
|
||||||
: function (xhr) { comments.innerHTML = (xhr.response.error === 'Comments not found.' ? fallback.split('</noscript>')[1] : fallback.split('<p>')[0]) },
|
: function (xhr) { comments.innerHTML = fallback; },
|
||||||
onError: function (xhr) {
|
onError: function (xhr) {
|
||||||
comments.innerHTML = spinnerHTML;
|
comments.innerHTML = spinnerHTML;
|
||||||
},
|
},
|
||||||
|
@ -72,7 +72,7 @@ function get_youtube_replies(target, load_more) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onNon200: function (xhr) {
|
onNon200: function (xhr) {
|
||||||
body.innerHTML = (xhr.response.error === 'Comments not found.' ? fallback.split('</noscript>')[1] : fallback.split('<p>')[0]);
|
body.innerHTML = fallback;
|
||||||
},
|
},
|
||||||
onTimeout: function (xhr) {
|
onTimeout: function (xhr) {
|
||||||
console.warn('Pulling comments failed');
|
console.warn('Pulling comments failed');
|
||||||
|
@ -117,6 +117,10 @@ function get_reddit_comments() {
|
|||||||
'?source=reddit&format=html' +
|
'?source=reddit&format=html' +
|
||||||
'&hl=' + video_data.preferences.locale;
|
'&hl=' + video_data.preferences.locale;
|
||||||
|
|
||||||
|
var onNon200 = function (xhr) { comments.innerHTML = fallback; };
|
||||||
|
if (video_data.params.comments[1] === 'youtube')
|
||||||
|
onNon200 = function (xhr) {};
|
||||||
|
|
||||||
helpers.xhr('GET', url, {retries: 5, entity_name: ''}, {
|
helpers.xhr('GET', url, {retries: 5, entity_name: ''}, {
|
||||||
on200: function (response) {
|
on200: function (response) {
|
||||||
comments.innerHTML = ' \
|
comments.innerHTML = ' \
|
||||||
@ -148,9 +152,7 @@ function get_reddit_comments() {
|
|||||||
comments.children[0].children[0].children[0].onclick = toggle_comments;
|
comments.children[0].children[0].children[0].onclick = toggle_comments;
|
||||||
comments.children[0].children[1].children[0].onclick = swap_comments;
|
comments.children[0].children[1].children[0].onclick = swap_comments;
|
||||||
},
|
},
|
||||||
onNon200: video_data.params.comments[1] === 'youtube'
|
onNon200: onNon200, // declared above
|
||||||
? function (xhr) {}
|
|
||||||
: function (xhr) { comments.innerHTML = (xhr.response.error === 'Comments not found.' ? fallback.split('</noscript>')[1] : fallback.split('<p>')[0]); }
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@
|
|||||||
"Deleted or invalid channel": "Deleted or invalid channel",
|
"Deleted or invalid channel": "Deleted or invalid channel",
|
||||||
"This channel does not exist.": "This channel does not exist.",
|
"This channel does not exist.": "This channel does not exist.",
|
||||||
"Could not get channel info.": "Could not get channel info.",
|
"Could not get channel info.": "Could not get channel info.",
|
||||||
"Could not fetch comments": "Could not fetch comments (they may be turned off)",
|
"Could not fetch comments": "Could not fetch comments",
|
||||||
"comments_view_x_replies": "View {{count}} reply",
|
"comments_view_x_replies": "View {{count}} reply",
|
||||||
"comments_view_x_replies_plural": "View {{count}} replies",
|
"comments_view_x_replies_plural": "View {{count}} replies",
|
||||||
"`x` ago": "`x` ago",
|
"`x` ago": "`x` ago",
|
||||||
|
@ -21,9 +21,6 @@
|
|||||||
<%= translate(locale, "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.") %>
|
<%= translate(locale, "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.") %>
|
||||||
</a>
|
</a>
|
||||||
</noscript>
|
</noscript>
|
||||||
<p>
|
|
||||||
<%= translate(locale, "Could not fetch comments") %>
|
|
||||||
</p>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -297,9 +297,6 @@ we're going to need to do it here in order to allow for translations.
|
|||||||
<%= translate(locale, "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.") %>
|
<%= translate(locale, "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.") %>
|
||||||
</a>
|
</a>
|
||||||
</noscript>
|
</noscript>
|
||||||
<p>
|
|
||||||
<%= translate(locale, "Could not fetch comments") %>
|
|
||||||
</p>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user