mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 06:26:27 -04:00
semicolons
This commit is contained in:
parent
eb7e48b059
commit
c72d3c4a0e
9 changed files with 73 additions and 73 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue