v1.18.x
Julian Lam 12 years ago
parent f4573d23b5
commit 4457228903

@ -93,6 +93,7 @@
socket.emit('api:notifications.get');
socket.emit('api:notifications.mark_all_read', null, function() {
notifIcon.className = 'icon-circle-blank';
utils.refreshTitle();
});
}
});
@ -139,6 +140,7 @@
});
socket.on('event:new_notification', function() {
document.querySelector('.notifications a i').className = 'icon-circle active';
utils.refreshTitle();
});

@ -124,6 +124,15 @@
}
return tags;
},
refreshTitle: function() {
var a = document.createElement('a');
a.href = document.location;
socket.emit('api:meta.buildTitle', a.pathname.slice(1), function(title) {
document.title = title;
});
}
}

Loading…
Cancel
Save