1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00

Update socket script

This commit is contained in:
DanieL 2022-12-13 11:39:52 -03:00
parent 45b91d97b6
commit 25b6a884b6
8 changed files with 274 additions and 88 deletions

View file

@ -41,12 +41,12 @@ function addTemplateFromArray(itemsArray) {
priority = 6;
}
var selector = '#topMenuUserNotifications ul .list-group .priority' + priority;
console.log('addTemplateFromArray prepend', selector);
//console.log('addTemplateFromArray prepend', selector);
try {
$(selector).prepend(template);
updateUserNotificationCount();
} catch (e) {
console.log('addTemplateFromArray prepend error', selector, e);
//console.log('addTemplateFromArray prepend error', selector, e);
}
return true;
}
@ -118,7 +118,7 @@ function updateUserNotificationCount() {
_updateUserNotificationCountTimeout = setTimeout(function () {
var valueNow = parseInt($('#topMenuUserNotifications a > span.badge-notify').text());
var total = $('#topMenuUserNotifications > ul .list-group a').length;
console.log('updateUserNotificationCount', total);
//console.log('updateUserNotificationCount', total);
if (total <= 0) {
$('#topMenuUserNotifications').addClass('hasNothingToShow');
$('#topMenuUserNotifications').removeClass('hasSomethingToShow');