forked from midou/invidious
semicolons
This commit is contained in:
@ -22,17 +22,17 @@ function get_subscriptions(callback, retries) {
|
||||
callback(subscriptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
xhr.onerror = function () {
|
||||
console.log('Pulling subscriptions failed... ' + retries + '/5');
|
||||
setTimeout(function () { get_subscriptions(callback, retries - 1) }, 1000);
|
||||
}
|
||||
setTimeout(function () { get_subscriptions(callback, retries - 1); }, 1000);
|
||||
};
|
||||
|
||||
xhr.ontimeout = function () {
|
||||
console.log('Pulling subscriptions failed... ' + retries + '/5');
|
||||
get_subscriptions(callback, retries - 1);
|
||||
}
|
||||
};
|
||||
|
||||
xhr.send();
|
||||
}
|
||||
@ -41,7 +41,7 @@ function create_notification_stream(subscriptions) {
|
||||
notifications = new SSE(
|
||||
'/api/v1/auth/notifications?fields=videoId,title,author,authorId,publishedText,published,authorThumbnails,liveNow', {
|
||||
withCredentials: true,
|
||||
payload: 'topics=' + subscriptions.map(function (subscription) { return subscription.authorId }).join(','),
|
||||
payload: 'topics=' + subscriptions.map(function (subscription) { return subscription.authorId; }).join(','),
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
|
||||
});
|
||||
delivered = [];
|
||||
@ -68,7 +68,7 @@ function create_notification_stream(subscriptions) {
|
||||
|
||||
system_notification.onclick = function (event) {
|
||||
window.open('/watch?v=' + event.currentTarget.tag, '_blank');
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
delivered.push(notification.videoId);
|
||||
@ -83,7 +83,7 @@ function create_notification_stream(subscriptions) {
|
||||
'<i class="icon ion-ios-notifications-outline"></i>';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
notifications.addEventListener('error', handle_notification_error);
|
||||
notifications.stream();
|
||||
@ -92,7 +92,7 @@ function create_notification_stream(subscriptions) {
|
||||
function handle_notification_error(event) {
|
||||
console.log('Something went wrong with notifications, trying to reconnect...');
|
||||
notifications = { close: function () { } };
|
||||
setTimeout(function () { get_subscriptions(create_notification_stream) }, 1000);
|
||||
setTimeout(function () { get_subscriptions(create_notification_stream); }, 1000);
|
||||
}
|
||||
|
||||
window.addEventListener('load', function (e) {
|
||||
|
Reference in New Issue
Block a user