mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 00:15:46 +01:00
metatitle
This commit is contained in:
@@ -421,6 +421,7 @@ var socket,
|
|||||||
interval: undefined,
|
interval: undefined,
|
||||||
titles: []
|
titles: []
|
||||||
};
|
};
|
||||||
|
|
||||||
app.alternatingTitle = function (title) {
|
app.alternatingTitle = function (title) {
|
||||||
if (typeof title !== 'string') {
|
if (typeof title !== 'string') {
|
||||||
return;
|
return;
|
||||||
@@ -451,7 +452,7 @@ var socket,
|
|||||||
url = a.pathname.slice(1);
|
url = a.pathname.slice(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
socket.emit('meta.buildTitle', url, function(title, numNotifications) {
|
socket.emit('meta.buildTitle', url, function(err, title, numNotifications) {
|
||||||
titleObj.titles[0] = (numNotifications > 0 ? '(' + numNotifications + ') ' : '') + title;
|
titleObj.titles[0] = (numNotifications > 0 ? '(' + numNotifications + ') ' : '') + title;
|
||||||
app.alternatingTitle('');
|
app.alternatingTitle('');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ SocketMeta.reconnected = function(socket) {
|
|||||||
|
|
||||||
SocketMeta.buildTitle = function(socket, text, callback) {
|
SocketMeta.buildTitle = function(socket, text, callback) {
|
||||||
meta.title.build(text, function(err, title) {
|
meta.title.build(text, function(err, title) {
|
||||||
callback(title);
|
callback(err, title);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user