remove meta/title.js and meta.title.build #3481

This commit is contained in:
barisusakli
2015-08-26 15:54:54 -04:00
parent 098c56a106
commit eaefd9d24c
18 changed files with 89 additions and 223 deletions

View File

@@ -389,19 +389,13 @@ app.cacheBuster = null;
}
};
app.refreshTitle = function(url) {
if (!url) {
var a = document.createElement('a');
a.href = document.location;
url = a.pathname.slice(1);
}
socket.emit('meta.buildTitle', url, function(err, title, numNotifications) {
if (err) {
return;
}
titleObj.titles[0] = (numNotifications > 0 ? '(' + numNotifications + ') ' : '') + title;
app.alternatingTitle('');
app.refreshTitle = function(title) {
require(['translator'], function(translator) {
translator.translate(title, function(translated) {
translated = translated ? (translated + ' | ' + config.browserTitle) : config.browserTitle;
titleObj.titles[0] = translated;
app.alternatingTitle('');
});
});
};