From 6c65162b05c3768f7972ed7a79f94aba5a5163b5 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 12 Feb 2015 12:27:51 -0500 Subject: [PATCH] FIX: Title could temporarily revert to the site name --- app/assets/javascripts/discourse.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/app/assets/javascripts/discourse.js b/app/assets/javascripts/discourse.js index feb375d90c0..5673a41e12a 100644 --- a/app/assets/javascripts/discourse.js +++ b/app/assets/javascripts/discourse.js @@ -1,16 +1,9 @@ /*global Favcount:true*/ - -/** - The main Discourse Application - - @class Discourse - @extends Ember.Application -**/ var DiscourseResolver = require('discourse/ember/resolver').default; window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, { rootElement: '#main', - _docTitle: null, + _docTitle: document.title, getURL: function(url) { // If it's a non relative URL, return it. @@ -46,13 +39,7 @@ window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, { title = "(" + notifyCount + ") " + title; } - if (title !== document.title) { - // chrome bug workaround see: http://stackoverflow.com/questions/2952384/changing-the-window-title-when-focussing-the-window-doesnt-work-in-chrome - window.setTimeout(function() { - document.title = "."; - document.title = title; - }, 200); - } + document.title = title; }.observes('_docTitle', 'hasFocus', 'notifyCount'), faviconChanged: function() {