From b9546686361371d084744f7a514f136c9aa06b50 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 30 Jan 2014 10:02:19 -0500 Subject: [PATCH] browser title, #911 --- src/webserver.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/webserver.js b/src/webserver.js index 9f96ba3b3b..ac0fee5e68 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -132,6 +132,16 @@ module.exports.server = server; href: meta.config['brand:favicon'] || nconf.get('relative_path') + '/favicon.ico' }); + // Browser Title + var metaTitle = templateValues.metaTags.filter(function(tag) { + return tag.property === 'og:title'; + }); + if (metaTitle.length > 0 && metaTitle[0].content) { + templateValues.browserTitle = metaTitle[0].content; + } else { + templateValues.browserTitle = meta.config.browserTitle || 'NodeBB'; + } + if(options.req.user && options.req.user.uid) { uid = options.req.user.uid; }