mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Add proper exception handling for comments, rather than sliently failing
This commit is contained in:
parent
bbf16279bb
commit
1300a8393b
4 changed files with 59 additions and 4 deletions
|
@ -219,9 +219,7 @@ function get_youtube_comments() {
|
|||
'&hl=' + video_data.preferences.locale +
|
||||
'&thin_mode=' + video_data.preferences.thin_mode;
|
||||
|
||||
var onNon200 = function (xhr) { comments.innerHTML = fallback; };
|
||||
if (video_data.params.comments[1] === 'youtube')
|
||||
onNon200 = function (xhr) {};
|
||||
var onNon200 = function (xhr) { comments.innerHTML = xhr.response.errorHtml; };
|
||||
|
||||
helpers.xhr('GET', url, {retries: 5, entity_name: 'comments'}, {
|
||||
on200: function (response) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue